mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 23:00:21 +00:00
HID: cp2112: make sysfs attributes static
No need to pollute namespace with dev_attr_*. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
e932d81786
commit
c3c041ba4c
@ -663,7 +663,7 @@ static ssize_t name##_show(struct device *kdev, \
|
|||||||
return ret; \
|
return ret; \
|
||||||
return scnprintf(buf, PAGE_SIZE, format, ##__VA_ARGS__); \
|
return scnprintf(buf, PAGE_SIZE, format, ##__VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
DEVICE_ATTR_RW(name);
|
static DEVICE_ATTR_RW(name);
|
||||||
|
|
||||||
CP2112_CONFIG_ATTR(vendor_id, ({
|
CP2112_CONFIG_ATTR(vendor_id, ({
|
||||||
u16 vid;
|
u16 vid;
|
||||||
@ -784,7 +784,7 @@ static ssize_t pstr_show(struct device *kdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CP2112_PSTR_ATTR(name, _report) \
|
#define CP2112_PSTR_ATTR(name, _report) \
|
||||||
struct cp2112_pstring_attribute dev_attr_##name = { \
|
static struct cp2112_pstring_attribute dev_attr_##name = { \
|
||||||
.attr = __ATTR(name, (S_IWUSR | S_IRUGO), pstr_show, pstr_store), \
|
.attr = __ATTR(name, (S_IWUSR | S_IRUGO), pstr_show, pstr_store), \
|
||||||
.report = _report, \
|
.report = _report, \
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user