diff options
author | Fabio Estevam <festevam@gmail.com> | 2012-01-12 13:09:15 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-24 08:43:13 -0500 |
commit | 4b5203f1883e2dd49273e9f91235c36a0708aad1 (patch) | |
tree | e9df598ae67ee56f535ba0cdf75fd056be4fb9c0 /drivers/usb/gadget/f_mass_storage.c | |
parent | c74c930082fd407e3b9e503d855d78777a8e5a84 (diff) |
usb: gadget: f_mass_storage: Use "bool" instead of "int" in fsg_module_parameters
Fix the following build warnings:
CC [M] drivers/usb/gadget/acm_ms.o
drivers/usb/gadget/acm_ms.c: In function ‘__check_ro’:
drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
drivers/usb/gadget/acm_ms.c: In function ‘__check_removable’:
drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
drivers/usb/gadget/acm_ms.c: In function ‘__check_cdrom’:
drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
drivers/usb/gadget/acm_ms.c: In function ‘__check_nofua’:
drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
drivers/usb/gadget/acm_ms.c: In function ‘__check_stall’:
drivers/usb/gadget/acm_ms.c:119: warning: return from incompatible pointer type
CC [M] drivers/usb/gadget/mass_storage.o
drivers/usb/gadget/mass_storage.c: In function ‘__check_ro’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_removable’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_cdrom’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_nofua’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
drivers/usb/gadget/mass_storage.c: In function ‘__check_stall’:
drivers/usb/gadget/mass_storage.c:94: warning: return from incompatible pointer type
Declare the fsg_module_parameters fields as "bool" so that they can match the types
passed in FSG_MODULE_PARAM_ARRAY macro.
Since commit 493c90ef (module_param: check that bool parameters really are bool.),
moduleparam.h was changed in a way that the "bool" parameter type now really
requires "bool" type and no longer allows "unsigned int".
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.c')
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index 6353eca1e852..ee8ceec01560 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c | |||
@@ -3123,15 +3123,15 @@ fsg_add(struct usb_composite_dev *cdev, struct usb_configuration *c, | |||
3123 | 3123 | ||
3124 | struct fsg_module_parameters { | 3124 | struct fsg_module_parameters { |
3125 | char *file[FSG_MAX_LUNS]; | 3125 | char *file[FSG_MAX_LUNS]; |
3126 | int ro[FSG_MAX_LUNS]; | 3126 | bool ro[FSG_MAX_LUNS]; |
3127 | int removable[FSG_MAX_LUNS]; | 3127 | bool removable[FSG_MAX_LUNS]; |
3128 | int cdrom[FSG_MAX_LUNS]; | 3128 | bool cdrom[FSG_MAX_LUNS]; |
3129 | int nofua[FSG_MAX_LUNS]; | 3129 | bool nofua[FSG_MAX_LUNS]; |
3130 | 3130 | ||
3131 | unsigned int file_count, ro_count, removable_count, cdrom_count; | 3131 | unsigned int file_count, ro_count, removable_count, cdrom_count; |
3132 | unsigned int nofua_count; | 3132 | unsigned int nofua_count; |
3133 | unsigned int luns; /* nluns */ | 3133 | unsigned int luns; /* nluns */ |
3134 | int stall; /* can_stall */ | 3134 | bool stall; /* can_stall */ |
3135 | }; | 3135 | }; |
3136 | 3136 | ||
3137 | #define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc) \ | 3137 | #define _FSG_MODULE_PARAM_ARRAY(prefix, params, name, type, desc) \ |