diff options
Diffstat (limited to 'drivers/dio/dio-sysfs.c')
-rw-r--r-- | drivers/dio/dio-sysfs.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/dio/dio-sysfs.c b/drivers/dio/dio-sysfs.c index f46463038847..ee1a3b59bd4e 100644 --- a/drivers/dio/dio-sysfs.c +++ b/drivers/dio/dio-sysfs.c | |||
@@ -58,20 +58,25 @@ static ssize_t dio_show_resource(struct device *dev, struct device_attribute *at | |||
58 | struct dio_dev *d = to_dio_dev(dev); | 58 | struct dio_dev *d = to_dio_dev(dev); |
59 | 59 | ||
60 | return sprintf(buf, "0x%08lx 0x%08lx 0x%08lx\n", | 60 | return sprintf(buf, "0x%08lx 0x%08lx 0x%08lx\n", |
61 | dio_resource_start(d), dio_resource_end(d), | 61 | (unsigned long)dio_resource_start(d), |
62 | (unsigned long)dio_resource_end(d), | ||
62 | dio_resource_flags(d)); | 63 | dio_resource_flags(d)); |
63 | } | 64 | } |
64 | static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL); | 65 | static DEVICE_ATTR(resource, S_IRUGO, dio_show_resource, NULL); |
65 | 66 | ||
66 | void dio_create_sysfs_dev_files(struct dio_dev *d) | 67 | int dio_create_sysfs_dev_files(struct dio_dev *d) |
67 | { | 68 | { |
68 | struct device *dev = &d->dev; | 69 | struct device *dev = &d->dev; |
70 | int error; | ||
69 | 71 | ||
70 | /* current configuration's attributes */ | 72 | /* current configuration's attributes */ |
71 | device_create_file(dev, &dev_attr_id); | 73 | if ((error = device_create_file(dev, &dev_attr_id)) || |
72 | device_create_file(dev, &dev_attr_ipl); | 74 | (error = device_create_file(dev, &dev_attr_ipl)) || |
73 | device_create_file(dev, &dev_attr_secid); | 75 | (error = device_create_file(dev, &dev_attr_secid)) || |
74 | device_create_file(dev, &dev_attr_name); | 76 | (error = device_create_file(dev, &dev_attr_name)) || |
75 | device_create_file(dev, &dev_attr_resource); | 77 | (error = device_create_file(dev, &dev_attr_resource))) |
78 | return error; | ||
79 | |||
80 | return 0; | ||
76 | } | 81 | } |
77 | 82 | ||