You can apply the first approach.
However, I would change the condition to:
if isinstance(m, nn.Conv2d):
    weight_norm(m.weight.data)

Would this work for you or what are you exactly doing in weight_norm?