diff options
author | Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be> | 2014-04-02 15:17:47 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-04-24 18:08:58 -0400 |
commit | ec2e11ed3faf9cf87f57031f1ed236888e2e4c64 (patch) | |
tree | 606857adecf5cb34c3108c58afed59a5860f1224 /drivers/net/can/softing | |
parent | abcd7f750a7e978a60c745e7c41dc468949365c2 (diff) |
can: softing: drop 'channel' sysfs attribute
netdev->dev_id obsoletes this property.
None of the remaining properties contribute to udev detection methods.
The regular calls for the sysfs group can thus safely be restored.
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/softing')
-rw-r--r-- | drivers/net/can/softing/softing_main.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/net/can/softing/softing_main.c b/drivers/net/can/softing/softing_main.c index 7d8c8f3672dd..532330bfb30f 100644 --- a/drivers/net/can/softing/softing_main.c +++ b/drivers/net/can/softing/softing_main.c | |||
@@ -556,15 +556,6 @@ failed: | |||
556 | /* | 556 | /* |
557 | * netdev sysfs | 557 | * netdev sysfs |
558 | */ | 558 | */ |
559 | static ssize_t show_channel(struct device *dev, struct device_attribute *attr, | ||
560 | char *buf) | ||
561 | { | ||
562 | struct net_device *ndev = to_net_dev(dev); | ||
563 | struct softing_priv *priv = netdev2softing(ndev); | ||
564 | |||
565 | return sprintf(buf, "%i\n", priv->index); | ||
566 | } | ||
567 | |||
568 | static ssize_t show_chip(struct device *dev, struct device_attribute *attr, | 559 | static ssize_t show_chip(struct device *dev, struct device_attribute *attr, |
569 | char *buf) | 560 | char *buf) |
570 | { | 561 | { |
@@ -609,12 +600,10 @@ static ssize_t store_output(struct device *dev, struct device_attribute *attr, | |||
609 | return count; | 600 | return count; |
610 | } | 601 | } |
611 | 602 | ||
612 | static const DEVICE_ATTR(channel, S_IRUGO, show_channel, NULL); | ||
613 | static const DEVICE_ATTR(chip, S_IRUGO, show_chip, NULL); | 603 | static const DEVICE_ATTR(chip, S_IRUGO, show_chip, NULL); |
614 | static const DEVICE_ATTR(output, S_IRUGO | S_IWUSR, show_output, store_output); | 604 | static const DEVICE_ATTR(output, S_IRUGO | S_IWUSR, show_output, store_output); |
615 | 605 | ||
616 | static const struct attribute *const netdev_sysfs_attrs[] = { | 606 | static const struct attribute *const netdev_sysfs_attrs[] = { |
617 | &dev_attr_channel.attr, | ||
618 | &dev_attr_chip.attr, | 607 | &dev_attr_chip.attr, |
619 | &dev_attr_output.attr, | 608 | &dev_attr_output.attr, |
620 | NULL, | 609 | NULL, |
@@ -679,17 +668,20 @@ static int softing_netdev_register(struct net_device *netdev) | |||
679 | { | 668 | { |
680 | int ret; | 669 | int ret; |
681 | 670 | ||
682 | netdev->sysfs_groups[0] = &netdev_sysfs_group; | ||
683 | ret = register_candev(netdev); | 671 | ret = register_candev(netdev); |
684 | if (ret) { | 672 | if (ret) { |
685 | dev_alert(&netdev->dev, "register failed\n"); | 673 | dev_alert(&netdev->dev, "register failed\n"); |
686 | return ret; | 674 | return ret; |
687 | } | 675 | } |
676 | if (sysfs_create_group(&netdev->dev.kobj, &netdev_sysfs_group) < 0) | ||
677 | netdev_alert(netdev, "sysfs group failed\n"); | ||
678 | |||
688 | return 0; | 679 | return 0; |
689 | } | 680 | } |
690 | 681 | ||
691 | static void softing_netdev_cleanup(struct net_device *netdev) | 682 | static void softing_netdev_cleanup(struct net_device *netdev) |
692 | { | 683 | { |
684 | sysfs_remove_group(&netdev->dev.kobj, &netdev_sysfs_group); | ||
693 | unregister_candev(netdev); | 685 | unregister_candev(netdev); |
694 | free_candev(netdev); | 686 | free_candev(netdev); |
695 | } | 687 | } |