From: Jean Delvare Date: Mon, 13 Aug 2007 09:26:26 +0000 (+0200) Subject: dmi-id: Possible cleanup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34b51f39e23bc9e529830ddf6108381d4bab95a6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Acked-by: Lennart Poettering Signed-off-by: Greg Kroah-Hartman --- 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{ #define to_dmi_dev_attr(_dev_attr) \ container_of(_dev_attr, struct dmi_device_attribute, dev_attr) -#define DEFINE_DMI_ATTR(_name, _mode, _show) \ -static struct device_attribute sys_dmi_##_name##_attr = \ - __ATTR(_name, _mode, _show, NULL); - static ssize_t sys_dmi_field_show(struct device *dev, struct device_attribute *attr, char *page) @@ -135,7 +131,8 @@ static ssize_t sys_dmi_modalias_show(struct device *dev, return r+1; } -DEFINE_DMI_ATTR(modalias, 0444, sys_dmi_modalias_show); +static struct device_attribute sys_dmi_modalias_attr = + __ATTR(modalias, 0444, sys_dmi_modalias_show, NULL); static struct attribute *sys_dmi_attributes[DMI_STRING_MAX+2];