From 1d0635a4fc3d48e140e3ecefd957004b9ede7846 Mon Sep 17 00:00:00 2001 From: Jinhyung Choi Date: Thu, 27 Feb 2014 17:17:33 +0900 Subject: [PATCH] SENSOR: removed the warning of __ATTR_RW duplication Change-Id: Ib77bec32159781acf034c6be8f33ab7907d163f0 Signed-off-by: Jinhyung Choi --- drivers/maru/maru_virtio_sensor.c | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/maru/maru_virtio_sensor.c b/drivers/maru/maru_virtio_sensor.c index 450034547514..1c6b330f1820 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), }; /* -- 2.34.1