diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 14:16:44 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 14:16:44 -0800 |
| commit | a9a206b3478ab900541d5bd898a42820567ae8fd (patch) | |
| tree | abf052cf11c2418baecf8ed65b354da59ec57329 | |
| parent | 3c1aa0ded0f2b34a4c8f5ed768bb112a7161c19d (diff) | |
| download | patches-a9a206b3478ab900541d5bd898a42820567ae8fd.tar.gz | |
sysfs fix
| -rw-r--r-- | driver-core/sysfs-fix-for-thinko-with-sysfs_bin_attr_init.patch | 59 | ||||
| -rw-r--r-- | series | 1 |
2 files changed, 60 insertions, 0 deletions
diff --git a/driver-core/sysfs-fix-for-thinko-with-sysfs_bin_attr_init.patch b/driver-core/sysfs-fix-for-thinko-with-sysfs_bin_attr_init.patch new file mode 100644 index 00000000000000..7d2d9172995fe9 --- /dev/null +++ b/driver-core/sysfs-fix-for-thinko-with-sysfs_bin_attr_init.patch @@ -0,0 +1,59 @@ +From sfr@canb.auug.org.au Mon Mar 1 01:37:59 2010 +From: Stephen Rothwell <sfr@canb.auug.org.au> +Date: Mon, 1 Mar 2010 20:38:36 +1100 +Subject: sysfs: fix for thinko with sysfs_bin_attr_init() + + + +After merging the final tree, today's linux-next build (powerpc +allyesconfig) failed like this: + +drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files': +drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand +drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' operand + +Caused by commit "sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on +dynamic attributes" interacting with commit "sysfs: Use one lockdep +class per sysfs attribute") both from the driver-core tree. + +Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> +Cc: "Eric W. Biederman" <ebiederm@xmission.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/pci/pci-sysfs.c | 4 ++-- + include/linux/sysfs.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/pci/pci-sysfs.c ++++ b/drivers/pci/pci-sysfs.c +@@ -642,7 +642,7 @@ void pci_create_legacy_files(struct pci_ + if (!b->legacy_io) + goto kzalloc_err; + +- sysfs_bin_attr_init(&b->legacy_io); ++ sysfs_bin_attr_init(b->legacy_io); + b->legacy_io->attr.name = "legacy_io"; + b->legacy_io->size = 0xffff; + b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; +@@ -655,7 +655,7 @@ void pci_create_legacy_files(struct pci_ + goto legacy_io_err; + + /* Allocated above after the legacy_io struct */ +- sysfs_bin_attr_init(&b->legacy_mem); ++ sysfs_bin_attr_init(b->legacy_mem); + b->legacy_mem = b->legacy_io + 1; + b->legacy_mem->attr.name = "legacy_mem"; + b->legacy_mem->size = 1024*1024; +--- a/include/linux/sysfs.h ++++ b/include/linux/sysfs.h +@@ -110,7 +110,7 @@ struct bin_attribute { + * enabled. Lockdep gives a nice error when your attribute is + * added to sysfs if you don't have this. + */ +-#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&bin_attr->attr) ++#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr) + + struct sysfs_ops { + ssize_t (*show)(struct kobject *, struct attribute *,char *); @@ -86,6 +86,7 @@ driver-core/sysfs-implement-sysfs_rename_link.patch driver-core/driver-core-use-sysfs_rename_link-in-device_rename.patch driver-core/sysfs-pass-super_block-to-sysfs_get_inode.patch driver-core/sysfs-kill-unused-sysfs_sb-variable.patch +driver-core/sysfs-fix-for-thinko-with-sysfs_bin_attr_init.patch driver-core/driver-core-create-lock-unlock-functions-for-struct-device.patch driver-core/drivers-base-convert-sema.patch |
