* [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems
@ 2013-09-28 3:57 Stefan Achatz
2013-09-28 4:02 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Achatz @ 2013-09-28 3:57 UTC (permalink / raw)
To: Jiri Kosina, linux-input, linux-kernel; +Cc: Greg KH
Fixing some wrong macro stringification/concatenation.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
drivers/hid/hid-roccat-kone.c | 2 +-
drivers/hid/hid-roccat-koneplus.c | 4 ++--
drivers/hid/hid-roccat-kovaplus.c | 4 ++--
drivers/hid/hid-roccat-pyra.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
index 602c188..6101816 100644
--- a/drivers/hid/hid-roccat-kone.c
+++ b/drivers/hid/hid-roccat-kone.c
@@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
}
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number = { \
- .attr = { .name = "profile##number", .mode = 0660 }, \
+ .attr = { .name = "profile" #number, .mode = 0660 }, \
.size = sizeof(struct kone_profile), \
.read = kone_sysfs_read_profilex, \
.write = kone_sysfs_write_profilex, \
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c
index 5ddf605..5e99fcd 100644
--- a/drivers/hid/hid-roccat-koneplus.c
+++ b/drivers/hid/hid-roccat-koneplus.c
@@ -229,13 +229,13 @@ static ssize_t koneplus_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = KONEPLUS_SIZE_PROFILE_SETTINGS, \
.read = koneplus_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = KONEPLUS_SIZE_PROFILE_BUTTONS, \
.read = koneplus_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c
index 515bc03..0c8e1ef 100644
--- a/drivers/hid/hid-roccat-kovaplus.c
+++ b/drivers/hid/hid-roccat-kovaplus.c
@@ -257,13 +257,13 @@ static ssize_t kovaplus_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = KOVAPLUS_SIZE_PROFILE_SETTINGS, \
.read = kovaplus_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = KOVAPLUS_SIZE_PROFILE_BUTTONS, \
.read = kovaplus_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c
index 5a6dbbe..1a07e07 100644
--- a/drivers/hid/hid-roccat-pyra.c
+++ b/drivers/hid/hid-roccat-pyra.c
@@ -225,13 +225,13 @@ static ssize_t pyra_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = PYRA_SIZE_PROFILE_SETTINGS, \
.read = pyra_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = PYRA_SIZE_PROFILE_BUTTONS, \
.read = pyra_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems
2013-09-28 3:57 [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems Stefan Achatz
@ 2013-09-28 4:02 ` Greg KH
2013-09-30 8:52 ` Jiri Kosina
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2013-09-28 4:02 UTC (permalink / raw)
To: Stefan Achatz; +Cc: Jiri Kosina, linux-input, linux-kernel
On Sat, Sep 28, 2013 at 05:57:46AM +0200, Stefan Achatz wrote:
> Fixing some wrong macro stringification/concatenation.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
> ---
> drivers/hid/hid-roccat-kone.c | 2 +-
> drivers/hid/hid-roccat-koneplus.c | 4 ++--
> drivers/hid/hid-roccat-kovaplus.c | 4 ++--
> drivers/hid/hid-roccat-pyra.c | 4 ++--
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
> index 602c188..6101816 100644
> --- a/drivers/hid/hid-roccat-kone.c
> +++ b/drivers/hid/hid-roccat-kone.c
> @@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
> }
> #define PROFILE_ATTR(number) \
> static struct bin_attribute bin_attr_profile##number = { \
> - .attr = { .name = "profile##number", .mode = 0660 }, \
> + .attr = { .name = "profile" #number, .mode = 0660 }, \
Ugh, very sorry about that, I hate macros in C at times :)
Jiri, can you take this through your tree, or I can if you want, it
needs to go in for 3.12-final.
If yours, feel free to add:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan, thanks for fixing my bugs, it's much appreciated.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems
2013-09-28 4:02 ` Greg KH
@ 2013-09-30 8:52 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2013-09-30 8:52 UTC (permalink / raw)
To: Greg KH; +Cc: Stefan Achatz, linux-input, linux-kernel
On Fri, 27 Sep 2013, Greg KH wrote:
> > Fixing some wrong macro stringification/concatenation.
> >
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
> > ---
> > drivers/hid/hid-roccat-kone.c | 2 +-
> > drivers/hid/hid-roccat-koneplus.c | 4 ++--
> > drivers/hid/hid-roccat-kovaplus.c | 4 ++--
> > drivers/hid/hid-roccat-pyra.c | 4 ++--
> > 4 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
> > index 602c188..6101816 100644
> > --- a/drivers/hid/hid-roccat-kone.c
> > +++ b/drivers/hid/hid-roccat-kone.c
> > @@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
> > }
> > #define PROFILE_ATTR(number) \
> > static struct bin_attribute bin_attr_profile##number = { \
> > - .attr = { .name = "profile##number", .mode = 0660 }, \
> > + .attr = { .name = "profile" #number, .mode = 0660 }, \
>
> Ugh, very sorry about that, I hate macros in C at times :)
>
> Jiri, can you take this through your tree, or I can if you want, it
> needs to go in for 3.12-final.
>
> If yours, feel free to add:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> Stefan, thanks for fixing my bugs, it's much appreciated.
Thanks, queued, will go to Linus for 3.12 still.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-30 8:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-28 3:57 [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems Stefan Achatz
2013-09-28 4:02 ` Greg KH
2013-09-30 8:52 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).