diff options
Diffstat (limited to 'drivers/input/mouse/psmouse.h')
-rw-r--r-- | drivers/input/mouse/psmouse.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h index 48e0112fb264..0f13c1b499ab 100644 --- a/drivers/input/mouse/psmouse.h +++ b/drivers/input/mouse/psmouse.h | |||
@@ -106,6 +106,7 @@ struct psmouse_attribute { | |||
106 | ssize_t (*show)(struct psmouse *psmouse, void *data, char *buf); | 106 | ssize_t (*show)(struct psmouse *psmouse, void *data, char *buf); |
107 | ssize_t (*set)(struct psmouse *psmouse, void *data, | 107 | ssize_t (*set)(struct psmouse *psmouse, void *data, |
108 | const char *buf, size_t count); | 108 | const char *buf, size_t count); |
109 | int protect; | ||
109 | }; | 110 | }; |
110 | #define to_psmouse_attr(a) container_of((a), struct psmouse_attribute, dattr) | 111 | #define to_psmouse_attr(a) container_of((a), struct psmouse_attribute, dattr) |
111 | 112 | ||
@@ -114,7 +115,7 @@ ssize_t psmouse_attr_show_helper(struct device *dev, struct device_attribute *at | |||
114 | ssize_t psmouse_attr_set_helper(struct device *dev, struct device_attribute *attr, | 115 | ssize_t psmouse_attr_set_helper(struct device *dev, struct device_attribute *attr, |
115 | const char *buf, size_t count); | 116 | const char *buf, size_t count); |
116 | 117 | ||
117 | #define PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set) \ | 118 | #define __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, _protect) \ |
118 | static ssize_t _show(struct psmouse *, void *data, char *); \ | 119 | static ssize_t _show(struct psmouse *, void *data, char *); \ |
119 | static ssize_t _set(struct psmouse *, void *data, const char *, size_t); \ | 120 | static ssize_t _set(struct psmouse *, void *data, const char *, size_t); \ |
120 | static struct psmouse_attribute psmouse_attr_##_name = { \ | 121 | static struct psmouse_attribute psmouse_attr_##_name = { \ |
@@ -129,6 +130,10 @@ static struct psmouse_attribute psmouse_attr_##_name = { \ | |||
129 | .data = _data, \ | 130 | .data = _data, \ |
130 | .show = _show, \ | 131 | .show = _show, \ |
131 | .set = _set, \ | 132 | .set = _set, \ |
133 | .protect = _protect, \ | ||
132 | } | 134 | } |
133 | 135 | ||
136 | #define PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set) \ | ||
137 | __PSMOUSE_DEFINE_ATTR(_name, _mode, _data, _show, _set, 1) | ||
138 | |||
134 | #endif /* _PSMOUSE_H */ | 139 | #endif /* _PSMOUSE_H */ |