diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2010-10-28 17:31:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 05:58:48 -0800 |
commit | 1ccd7923fe521273d63d936129754e71a33ebe51 (patch) | |
tree | f374868afce3d2990fbf742b7e26750e3e230d86 /drivers/usb/gadget/f_mass_storage.c | |
parent | 17a936117c587c23aafafdb9cd6d433a90daa83d (diff) | |
download | kernel_samsung_aries-1ccd7923fe521273d63d936129754e71a33ebe51.zip kernel_samsung_aries-1ccd7923fe521273d63d936129754e71a33ebe51.tar.gz kernel_samsung_aries-1ccd7923fe521273d63d936129754e71a33ebe51.tar.bz2 |
USB: gadget: f_mass_storage: use ?: instead of a macro
This commit removes an "OR" macro defined in Mass Storage
Function in favour of a two argument version of "?:" operator
(which is a GCC extension).
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.c')
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index c89b992..2a4aca1d 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -2822,14 +2822,12 @@ buffhds_first_it: i = 0x0399; } } -#define OR(x, y) ((x) ? (x) : (y)) snprintf(common->inquiry_string, sizeof common->inquiry_string, - "%-8s%-16s%04x", - OR(cfg->vendor_name, "Linux "), + "%-8s%-16s%04x", cfg->vendor_name ?: "Linux", /* Assume product name dependent on the first LUN */ - OR(cfg->product_name, common->luns->cdrom + cfg->product_name ?: (common->luns->cdrom ? "File-Stor Gadget" - : "File-CD Gadget "), + : "File-CD Gadget"), i); @@ -2848,14 +2846,13 @@ buffhds_first_it: /* Tell the thread to start working */ common->thread_task = kthread_create(fsg_main_thread, common, - OR(cfg->thread_name, "file-storage")); + cfg->thread_name ?: "file-storage"); if (IS_ERR(common->thread_task)) { rc = PTR_ERR(common->thread_task); goto error_release; } init_completion(&common->thread_notifier); init_waitqueue_head(&common->fsg_wait); -#undef OR /* Information */ |