X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=drivers%2Fparport%2Fprocfs.c;h=d740eba3c0999ed77d0f9b78a8d6ee5876f20b46;hb=76c49909a69259c0f1fee4f88f8c326fc5efe0dd;hp=ee7b5daabfd438beb15df7b5c0901dbf26ce63e9;hpb=f558b8364e19f9222e7976c64e9367f66bab02cc;p=linux-2.6-microblaze.git 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);