From: Greg Kroah-Hartman <gregkh@suse.de>
Date: Wed, 4 Jan 2012 23:05:10 +0000 (-0800)
Subject: driver core: remove __must_check from device_create_file
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9d4e714a86a4e88c2f530c76597f7025e5851d6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

driver core: remove __must_check from device_create_file

With the conversion of the sysdev to a real struct device, more drivers
are calling device_create_file, and some of them don't check the return
value, which isn't wise.

But as they happen to be in parts of the kernel where a warning is
considered an error (i.e. powerpc), this breaks the build.  So for now,
remove the marking on the function, which fixes the build problems.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---

diff --git a/include/linux/device.h b/include/linux/device.h
index 7f9fc1505e94..acf505e4fe94 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -510,8 +510,8 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
 	struct dev_ext_attribute dev_attr_##_name = \
 		{ __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
 
-extern int __must_check device_create_file(struct device *device,
-					const struct device_attribute *entry);
+extern int device_create_file(struct device *device,
+			      const struct device_attribute *entry);
 extern void device_remove_file(struct device *dev,
 			       const struct device_attribute *attr);
 extern int __must_check device_create_bin_file(struct device *dev,