From 62e877b893e6350c900d381f353aa62ed48dcc97 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell 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 Cc: "Eric W. Biederman" Signed-off-by: Greg Kroah-Hartman --- include/linux/sysfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/sysfs.h') diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index d77cde6d049..f0496b3d181 100644 --- 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 *); -- cgit v1.2.3