aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-06-21 16:21:20 -0700
committerTony Luck <tony.luck@intel.com>2005-06-21 16:21:20 -0700
commit29516d75a0b09e0a0328dd55c98a342515c9615a (patch)
tree4b03326311958ad6de82653a1caf289ad8c38538 /arch/ia64
parent4ea78729b8dbfc400fe165a57b90a394a7275a54 (diff)
parent4a4f8fdba6f5a34ca90f426021e17491a30202da (diff)
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/sn/kernel/tiocx.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index ab9b5f35c2a..a087b274847 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -432,7 +432,7 @@ static int tiocx_reload(struct cx_dev *cx_dev)
return cx_device_reload(cx_dev);
}
-static ssize_t show_cxdev_control(struct device *dev, char *buf)
+static ssize_t show_cxdev_control(struct device *dev, struct device_attribute *attr, char *buf)
{
struct cx_dev *cx_dev = to_cx_dev(dev);
@@ -442,7 +442,7 @@ static ssize_t show_cxdev_control(struct device *dev, char *buf)
tiocx_btchar_get(cx_dev->cx_id.nasid));
}
-static ssize_t store_cxdev_control(struct device *dev, const char *buf,
+static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf,
size_t count)
{
int n;
@@ -518,25 +518,22 @@ static int __init tiocx_init(void)
return 0;
}
-static void __exit tiocx_exit(void)
+static int cx_remove_device(struct device * dev, void * data)
{
- struct device *dev;
- struct device *tdev;
+ struct cx_dev *cx_dev = to_cx_dev(dev);
+ device_remove_file(dev, &dev_attr_cxdev_control);
+ cx_device_unregister(cx_dev);
+ return 0;
+}
+static void __exit tiocx_exit(void)
+{
DBG("tiocx_exit\n");
/*
* Unregister devices.
*/
- list_for_each_entry_safe(dev, tdev, &tiocx_bus_type.devices.list,
- bus_list) {
- if (dev) {
- struct cx_dev *cx_dev = to_cx_dev(dev);
- device_remove_file(dev, &dev_attr_cxdev_control);
- cx_device_unregister(cx_dev);
- }
- }
-
+ bus_for_each_dev(&tiocx_bus_type, NULL, NULL, cx_remove_device);
bus_unregister(&tiocx_bus_type);
}