Skip to content

Commit 550dbf4

Browse files
Stefan AchatzJiri Kosina
authored andcommitted
HID: roccat: Fix "cannot create duplicate filename" problems
Fixing some wrong macro stringification/concatenation. Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Stefan Achatz <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 19872d2 commit 550dbf4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

drivers/hid/hid-roccat-kone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
382382
}
383383
#define PROFILE_ATTR(number) \
384384
static struct bin_attribute bin_attr_profile##number = { \
385-
.attr = { .name = "profile##number", .mode = 0660 }, \
385+
.attr = { .name = "profile" #number, .mode = 0660 }, \
386386
.size = sizeof(struct kone_profile), \
387387
.read = kone_sysfs_read_profilex, \
388388
.write = kone_sysfs_write_profilex, \

drivers/hid/hid-roccat-koneplus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ static ssize_t koneplus_sysfs_read_profilex_buttons(struct file *fp,
229229

230230
#define PROFILE_ATTR(number) \
231231
static struct bin_attribute bin_attr_profile##number##_settings = { \
232-
.attr = { .name = "profile##number##_settings", .mode = 0440 }, \
232+
.attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
233233
.size = KONEPLUS_SIZE_PROFILE_SETTINGS, \
234234
.read = koneplus_sysfs_read_profilex_settings, \
235235
.private = &profile_numbers[number-1], \
236236
}; \
237237
static struct bin_attribute bin_attr_profile##number##_buttons = { \
238-
.attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
238+
.attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
239239
.size = KONEPLUS_SIZE_PROFILE_BUTTONS, \
240240
.read = koneplus_sysfs_read_profilex_buttons, \
241241
.private = &profile_numbers[number-1], \

drivers/hid/hid-roccat-kovaplus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ static ssize_t kovaplus_sysfs_read_profilex_buttons(struct file *fp,
257257

258258
#define PROFILE_ATTR(number) \
259259
static struct bin_attribute bin_attr_profile##number##_settings = { \
260-
.attr = { .name = "profile##number##_settings", .mode = 0440 }, \
260+
.attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
261261
.size = KOVAPLUS_SIZE_PROFILE_SETTINGS, \
262262
.read = kovaplus_sysfs_read_profilex_settings, \
263263
.private = &profile_numbers[number-1], \
264264
}; \
265265
static struct bin_attribute bin_attr_profile##number##_buttons = { \
266-
.attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
266+
.attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
267267
.size = KOVAPLUS_SIZE_PROFILE_BUTTONS, \
268268
.read = kovaplus_sysfs_read_profilex_buttons, \
269269
.private = &profile_numbers[number-1], \

drivers/hid/hid-roccat-pyra.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,13 @@ static ssize_t pyra_sysfs_read_profilex_buttons(struct file *fp,
225225

226226
#define PROFILE_ATTR(number) \
227227
static struct bin_attribute bin_attr_profile##number##_settings = { \
228-
.attr = { .name = "profile##number##_settings", .mode = 0440 }, \
228+
.attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
229229
.size = PYRA_SIZE_PROFILE_SETTINGS, \
230230
.read = pyra_sysfs_read_profilex_settings, \
231231
.private = &profile_numbers[number-1], \
232232
}; \
233233
static struct bin_attribute bin_attr_profile##number##_buttons = { \
234-
.attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
234+
.attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
235235
.size = PYRA_SIZE_PROFILE_BUTTONS, \
236236
.read = pyra_sysfs_read_profilex_buttons, \
237237
.private = &profile_numbers[number-1], \

0 commit comments

Comments
 (0)