From: Jinhyung Choi Date: Thu, 27 Feb 2014 08:17:33 +0000 (+0900) Subject: SENSOR: removed the warning of __ATTR_RW duplication X-Git-Tag: submit/tizen_common/20140905.094502~117^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F16937%2F1;p=sdk%2Femulator%2Femulator-kernel.git SENSOR: removed the warning of __ATTR_RW duplication Change-Id: Ib77bec32159781acf034c6be8f33ab7907d163f0 Signed-off-by: Jinhyung Choi --- diff --git a/drivers/maru/maru_virtio_sensor.c b/drivers/maru/maru_virtio_sensor.c index 4500345..1c6b330 100644 --- a/drivers/maru/maru_virtio_sensor.c +++ b/drivers/maru/maru_virtio_sensor.c @@ -99,12 +99,12 @@ struct virtio_sensor *vs; static struct class* sensor_class; -#define __ATTR_RONLY(_name,_show) { \ +#define ___ATTR_RONLY(_name,_show) { \ .attr = { .name = __stringify(_name), .mode = 0444 }, \ .show = _show, \ } -#define __ATTR_RW(_name) { \ +#define ___ATTR_RW(_name) { \ .attr = {.name = __stringify(_name), .mode = 0644 }, \ .show = _name##_show, \ .store = _name##_store, \ @@ -136,8 +136,8 @@ static ssize_t xyz_store(struct device *dev, struct device_attribute *attr, cons static struct device_attribute da_accel [] = { - __ATTR_RONLY(name, accel_name_show), - __ATTR_RW(xyz), + ___ATTR_RONLY(name, accel_name_show), + ___ATTR_RW(xyz), }; /* @@ -178,9 +178,9 @@ static ssize_t tesla_store(struct device *dev, struct device_attribute *attr, co static struct device_attribute da_geo [] = { - __ATTR_RONLY(name, geo_name_show), - __ATTR_RW(raw), - __ATTR_RW(tesla), + ___ATTR_RONLY(name, geo_name_show), + ___ATTR_RW(raw), + ___ATTR_RW(tesla), }; @@ -235,10 +235,10 @@ static ssize_t gyro_z_raw_store(struct device *dev, struct device_attribute *att static struct device_attribute da_gyro [] = { - __ATTR_RONLY(name, gyro_name_show), - __ATTR_RW(gyro_x_raw), - __ATTR_RW(gyro_y_raw), - __ATTR_RW(gyro_z_raw), + ___ATTR_RONLY(name, gyro_name_show), + ___ATTR_RW(gyro_x_raw), + ___ATTR_RW(gyro_y_raw), + ___ATTR_RW(gyro_z_raw), }; /* @@ -280,9 +280,9 @@ static ssize_t level_store(struct device *dev, struct device_attribute *attr, co static struct device_attribute da_light [] = { - __ATTR_RONLY(name, light_name_show), - __ATTR_RW(adc), - __ATTR_RW(level), + ___ATTR_RONLY(name, light_name_show), + ___ATTR_RW(adc), + ___ATTR_RW(level), }; @@ -325,9 +325,9 @@ static ssize_t vo_store(struct device *dev, struct device_attribute *attr, const static struct device_attribute da_proxi [] = { - __ATTR_RONLY(name, proxi_name_show), - __ATTR_RW(enable), - __ATTR_RW(vo), + ___ATTR_RONLY(name, proxi_name_show), + ___ATTR_RW(enable), + ___ATTR_RW(vo), }; /*