aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/dmi-id.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-08-13 05:26:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:04 -0400
commit34b51f39e23bc9e529830ddf6108381d4bab95a6 (patch)
tree8b10bea6023d1c49d18ce1748b9448c3451b3871 /drivers/firmware/dmi-id.c
parent6374475661172d508a9b93a2740a3fdc9d899756 (diff)
dmi-id: Possible cleanup
The DEFINE_DMI_ATTR macro has a single user left so we can expand it for slightly shorter/simpler code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firmware/dmi-id.c')
-rw-r--r--drivers/firmware/dmi-id.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index a7bd87d52897..b6e1eb77d148 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -20,10 +20,6 @@ struct dmi_device_attribute{
20#define to_dmi_dev_attr(_dev_attr) \ 20#define to_dmi_dev_attr(_dev_attr) \
21 container_of(_dev_attr, struct dmi_device_attribute, dev_attr) 21 container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
22 22
23#define DEFINE_DMI_ATTR(_name, _mode, _show) \
24static struct device_attribute sys_dmi_##_name##_attr = \
25 __ATTR(_name, _mode, _show, NULL);
26
27static ssize_t sys_dmi_field_show(struct device *dev, 23static ssize_t sys_dmi_field_show(struct device *dev,
28 struct device_attribute *attr, 24 struct device_attribute *attr,
29 char *page) 25 char *page)
@@ -135,7 +131,8 @@ static ssize_t sys_dmi_modalias_show(struct device *dev,
135 return r+1; 131 return r+1;
136} 132}
137 133
138DEFINE_DMI_ATTR(modalias, 0444, sys_dmi_modalias_show); 134static struct device_attribute sys_dmi_modalias_attr =
135 __ATTR(modalias, 0444, sys_dmi_modalias_show, NULL);
139 136
140static struct attribute *sys_dmi_attributes[DMI_STRING_MAX+2]; 137static struct attribute *sys_dmi_attributes[DMI_STRING_MAX+2];
141 138