aboutsummaryrefslogtreecommitdiff
path: root/drivers/zorro/zorro-sysfs.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-20 09:23:28 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-20 09:23:28 +0100
commit0ce1c383681370964e7f77dd44506aeb3a6ba657 (patch)
tree75aa590c636feed7d110c03eddb56cc518fc034c /drivers/zorro/zorro-sysfs.c
parent0a2a18b721abc960fbcada406746877d22340a60 (diff)
parent1de9e8e70f5acc441550ca75433563d91b269bbe (diff)
Merge commit 'v2.6.29-rc2' into x86/mm
Diffstat (limited to 'drivers/zorro/zorro-sysfs.c')
-rw-r--r--drivers/zorro/zorro-sysfs.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/zorro/zorro-sysfs.c b/drivers/zorro/zorro-sysfs.c
index 5290552d2ef..1d2a772ea14 100644
--- a/drivers/zorro/zorro-sysfs.c
+++ b/drivers/zorro/zorro-sysfs.c
@@ -77,17 +77,21 @@ static struct bin_attribute zorro_config_attr = {
.read = zorro_read_config,
};
-void zorro_create_sysfs_dev_files(struct zorro_dev *z)
+int zorro_create_sysfs_dev_files(struct zorro_dev *z)
{
struct device *dev = &z->dev;
+ int error;
/* current configuration's attributes */
- device_create_file(dev, &dev_attr_id);
- device_create_file(dev, &dev_attr_type);
- device_create_file(dev, &dev_attr_serial);
- device_create_file(dev, &dev_attr_slotaddr);
- device_create_file(dev, &dev_attr_slotsize);
- device_create_file(dev, &dev_attr_resource);
- sysfs_create_bin_file(&dev->kobj, &zorro_config_attr);
+ if ((error = device_create_file(dev, &dev_attr_id)) ||
+ (error = device_create_file(dev, &dev_attr_type)) ||
+ (error = device_create_file(dev, &dev_attr_serial)) ||
+ (error = device_create_file(dev, &dev_attr_slotaddr)) ||
+ (error = device_create_file(dev, &dev_attr_slotsize)) ||
+ (error = device_create_file(dev, &dev_attr_resource)) ||
+ (error = sysfs_create_bin_file(&dev->kobj, &zorro_config_attr)))
+ return error;
+
+ return 0;
}