Move sysfs attribute file managment from .h to .c

It's specific to our compilation unit, nothing to export
This commit is contained in:
Richard Sailer 2019-05-31 21:53:12 +02:00
parent 4d57e59887
commit 1ce4d04425
2 changed files with 12 additions and 11 deletions

View file

@ -200,6 +200,18 @@ static ssize_t set_mode_fs(struct device *child, struct device_attribute *attr,
// Sysfs Interface for if the keyboard has extra region // Sysfs Interface for if the keyboard has extra region
static ssize_t show_hasextra_fs(struct device *child, static ssize_t show_hasextra_fs(struct device *child,
struct device_attribute *attr, char *buffer); struct device_attribute *attr, char *buffer);
// Sysfs device Attributes
static DEVICE_ATTR(state, 0644, show_state_fs, set_state_fs);
static DEVICE_ATTR(color_left, 0644, show_color_left_fs, set_color_left_fs);
static DEVICE_ATTR(color_center, 0644, show_color_center_fs,
set_color_center_fs);
static DEVICE_ATTR(color_right, 0644, show_color_right_fs, set_color_right_fs);
static DEVICE_ATTR(color_extra, 0644, show_color_extra_fs, set_color_extra_fs);
static DEVICE_ATTR(brightness, 0644, show_brightness_fs, set_brightness_fs);
static DEVICE_ATTR(mode, 0644, show_mode_fs, set_mode_fs);
static DEVICE_ATTR(extra, 0444, show_hasextra_fs, NULL);
// Sysfs Interface for the keyboard state (ON / OFF) // Sysfs Interface for the keyboard state (ON / OFF)
static ssize_t static ssize_t
show_state_fs(struct device *child, struct device_attribute *attr, char *buffer) show_state_fs(struct device *child, struct device_attribute *attr, char *buffer)

View file

@ -80,15 +80,4 @@
// Sysfs device Attributes
static DEVICE_ATTR(state, 0644, show_state_fs, set_state_fs);
static DEVICE_ATTR(color_left, 0644, show_color_left_fs, set_color_left_fs);
static DEVICE_ATTR(color_center, 0644, show_color_center_fs,
set_color_center_fs);
static DEVICE_ATTR(color_right, 0644, show_color_right_fs, set_color_right_fs);
static DEVICE_ATTR(color_extra, 0644, show_color_extra_fs, set_color_extra_fs);
static DEVICE_ATTR(brightness, 0644, show_brightness_fs, set_brightness_fs);
static DEVICE_ATTR(mode, 0644, show_mode_fs, set_mode_fs);
static DEVICE_ATTR(extra, 0444, show_hasextra_fs, NULL);
#endif #endif