]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
net: fix warning about non-const string
authorStephen Hemminger <shemminger@vyatta.com>
Mon, 9 Mar 2009 13:51:55 +0000 (13:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2009 12:22:43 +0000 (05:22 -0700)
Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c

index 484f58750eba0438cff11dcf0979ceb4ef46738b..2da59a0ac4ac4a527f3db356893b614ed0a0a585 100644 (file)
@@ -498,7 +498,7 @@ int netdev_register_kobject(struct net_device *net)
        dev->groups = groups;
 
        BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
-       dev_set_name(dev, net->name);
+       dev_set_name(dev, "%s", net->name);
 
 #ifdef CONFIG_SYSFS
        *groups++ = &netstat_group;