diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2010-10-28 11:31:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-11 08:58:48 -0500 |
commit | 1ccd7923fe521273d63d936129754e71a33ebe51 (patch) | |
tree | f374868afce3d2990fbf742b7e26750e3e230d86 /drivers | |
parent | 17a936117c587c23aafafdb9cd6d433a90daa83d (diff) |
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')
-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 c89b99295c1f..2a4aca1d4865 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c | |||
@@ -2822,14 +2822,12 @@ buffhds_first_it: | |||
2822 | i = 0x0399; | 2822 | i = 0x0399; |
2823 | } | 2823 | } |
2824 | } | 2824 | } |
2825 | #define OR(x, y) ((x) ? (x) : (y)) | ||
2826 | snprintf(common->inquiry_string, sizeof common->inquiry_string, | 2825 | snprintf(common->inquiry_string, sizeof common->inquiry_string, |
2827 | "%-8s%-16s%04x", | 2826 | "%-8s%-16s%04x", cfg->vendor_name ?: "Linux", |
2828 | OR(cfg->vendor_name, "Linux "), | ||
2829 | /* Assume product name dependent on the first LUN */ | 2827 | /* Assume product name dependent on the first LUN */ |
2830 | OR(cfg->product_name, common->luns->cdrom | 2828 | cfg->product_name ?: (common->luns->cdrom |
2831 | ? "File-Stor Gadget" | 2829 | ? "File-Stor Gadget" |
2832 | : "File-CD Gadget "), | 2830 | : "File-CD Gadget"), |
2833 | i); | 2831 | i); |
2834 | 2832 | ||
2835 | 2833 | ||
@@ -2848,14 +2846,13 @@ buffhds_first_it: | |||
2848 | /* Tell the thread to start working */ | 2846 | /* Tell the thread to start working */ |
2849 | common->thread_task = | 2847 | common->thread_task = |
2850 | kthread_create(fsg_main_thread, common, | 2848 | kthread_create(fsg_main_thread, common, |
2851 | OR(cfg->thread_name, "file-storage")); | 2849 | cfg->thread_name ?: "file-storage"); |
2852 | if (IS_ERR(common->thread_task)) { | 2850 | if (IS_ERR(common->thread_task)) { |
2853 | rc = PTR_ERR(common->thread_task); | 2851 | rc = PTR_ERR(common->thread_task); |
2854 | goto error_release; | 2852 | goto error_release; |
2855 | } | 2853 | } |
2856 | init_completion(&common->thread_notifier); | 2854 | init_completion(&common->thread_notifier); |
2857 | init_waitqueue_head(&common->fsg_wait); | 2855 | init_waitqueue_head(&common->fsg_wait); |
2858 | #undef OR | ||
2859 | 2856 | ||
2860 | 2857 | ||
2861 | /* Information */ | 2858 | /* Information */ |