aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Bernd Themann <ossthema@de.ibm.com>2008-02-01 09:37:42 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-03 07:26:00 -0500
commite87ceea13e84a0748487ed0f9ccbfbc646966339 (patch)
treedee3e9f1f773d904538402df628be2f3ff2318b5
parent26d29ea799b200c2499a7b41920c2dbfe710bea7 (diff)
ehea: fix sysfs link compile problem
Due to changes in the struct device_driver there is no direct access to its kobj any longer. The kobj was used to create sysfs links between eHEA ethernet devices and the driver. This patch removes the affected sysfs links to resolve the build problems. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ehea/ehea_main.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 99ea46ab60cc..c051c7e09b9a 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2809,34 +2809,6 @@ static void __devinit logical_port_release(struct device *dev)
2809 of_node_put(port->ofdev.node); 2809 of_node_put(port->ofdev.node);
2810} 2810}
2811 2811
2812static int ehea_driver_sysfs_add(struct device *dev,
2813 struct device_driver *driver)
2814{
2815 int ret;
2816
2817 ret = sysfs_create_link(&driver->kobj, &dev->kobj,
2818 kobject_name(&dev->kobj));
2819 if (ret == 0) {
2820 ret = sysfs_create_link(&dev->kobj, &driver->kobj,
2821 "driver");
2822 if (ret)
2823 sysfs_remove_link(&driver->kobj,
2824 kobject_name(&dev->kobj));
2825 }
2826 return ret;
2827}
2828
2829static void ehea_driver_sysfs_remove(struct device *dev,
2830 struct device_driver *driver)
2831{
2832 struct device_driver *drv = driver;
2833
2834 if (drv) {
2835 sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
2836 sysfs_remove_link(&dev->kobj, "driver");
2837 }
2838}
2839
2840static struct device *ehea_register_port(struct ehea_port *port, 2812static struct device *ehea_register_port(struct ehea_port *port,
2841 struct device_node *dn) 2813 struct device_node *dn)
2842{ 2814{
@@ -2861,16 +2833,8 @@ static struct device *ehea_register_port(struct ehea_port *port,
2861 goto out_unreg_of_dev; 2833 goto out_unreg_of_dev;
2862 } 2834 }
2863 2835
2864 ret = ehea_driver_sysfs_add(&port->ofdev.dev, &ehea_driver.driver);
2865 if (ret) {
2866 ehea_error("failed to register sysfs driver link");
2867 goto out_rem_dev_file;
2868 }
2869
2870 return &port->ofdev.dev; 2836 return &port->ofdev.dev;
2871 2837
2872out_rem_dev_file:
2873 device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id);
2874out_unreg_of_dev: 2838out_unreg_of_dev:
2875 of_device_unregister(&port->ofdev); 2839 of_device_unregister(&port->ofdev);
2876out: 2840out:
@@ -2879,7 +2843,6 @@ out:
2879 2843
2880static void ehea_unregister_port(struct ehea_port *port) 2844static void ehea_unregister_port(struct ehea_port *port)
2881{ 2845{
2882 ehea_driver_sysfs_remove(&port->ofdev.dev, &ehea_driver.driver);
2883 device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id); 2846 device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id);
2884 of_device_unregister(&port->ofdev); 2847 of_device_unregister(&port->ofdev);
2885} 2848}