mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
staging: greybus: Remove unused macro
Remove unused macro as indicated by the compiler when building with make W=2 Signed-off-by: Michail Tatas <michail.tatas@gmail.com> Link: https://patch.msgid.link/ahdNZlYqnTO22tQq@michalis-linux Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b5c347f7f0
commit
cbc8262f68
@@ -167,32 +167,6 @@ static DEVICE_ATTR_RO(name##_avg)
|
||||
gb_loopback_ro_stats_attr(field, max, u); \
|
||||
gb_loopback_ro_avg_attr(field)
|
||||
|
||||
#define gb_loopback_attr(field, type) \
|
||||
static ssize_t field##_show(struct device *dev, \
|
||||
struct device_attribute *attr, \
|
||||
char *buf) \
|
||||
{ \
|
||||
struct gb_loopback *gb = dev_get_drvdata(dev); \
|
||||
return sysfs_emit(buf, "%" #type "\n", gb->field); \
|
||||
} \
|
||||
static ssize_t field##_store(struct device *dev, \
|
||||
struct device_attribute *attr, \
|
||||
const char *buf, \
|
||||
size_t len) \
|
||||
{ \
|
||||
int ret; \
|
||||
struct gb_loopback *gb = dev_get_drvdata(dev); \
|
||||
mutex_lock(&gb->mutex); \
|
||||
ret = sscanf(buf, "%"#type, &gb->field); \
|
||||
if (ret != 1) \
|
||||
len = -EINVAL; \
|
||||
else \
|
||||
gb_loopback_check_attr(gb, bundle); \
|
||||
mutex_unlock(&gb->mutex); \
|
||||
return len; \
|
||||
} \
|
||||
static DEVICE_ATTR_RW(field)
|
||||
|
||||
#define gb_dev_loopback_ro_attr(field) \
|
||||
static ssize_t field##_show(struct device *dev, \
|
||||
struct device_attribute *attr, \
|
||||
|
||||
Reference in New Issue
Block a user