aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/parport/procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/parport/procfs.c')
-rw-r--r--drivers/parport/procfs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index ee7b5daabfd4..d740eba3c099 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -210,7 +210,11 @@ static int do_hardware_modes(struct ctl_table *table, int write,
return -EACCES;
{
-#define printmode(x) {if(port->modes&PARPORT_MODE_##x){len+=sprintf(buffer+len,"%s%s",f?",":"",#x);f++;}}
+#define printmode(x) \
+do { \
+ if (port->modes & PARPORT_MODE_##x) \
+ len += sprintf(buffer + len, "%s%s", f++ ? "," : "", #x); \
+} while (0)
int f = 0;
printmode(PCSPP);
printmode(TRISTATE);