1. 05 2月, 2011 2 次提交
    • J
      USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct · a283c03a
      Jesper Juhl 提交于
      Trying to compile drivers/usb/gadget/f_mass_storage.o currently fails and
      spews a ton of warnings :
      
        CC      drivers/usb/gadget/f_mass_storage.o
      drivers/usb/gadget/f_mass_storage.c:436:22: error: field ‘function’ has incomplete type
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_from_func’:
      drivers/usb/gadget/f_mass_storage.c:466:9: warning: type defaults to ‘int’ in declaration of ‘__mptr’
      drivers/usb/gadget/f_mass_storage.c:466:9: warning: initialization from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:2743:15: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:2743:15: warning: its scope is only this definition or declaration, which is probably not what you want
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_init’:
      drivers/usb/gadget/f_mass_storage.c:2745:34: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:2775:23: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:2779:3: error: implicit declaration of function ‘usb_string_id’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:2984:60: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3003:57: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind’:
      drivers/usb/gadget/f_mass_storage.c:3006:31: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3013:2: error: implicit declaration of function ‘usb_interface_id’
      drivers/usb/gadget/f_mass_storage.c:3033:3: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3034:6: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3043:4: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3044:7: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c:3045:26: error: dereferencing pointer to incomplete type
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3067:14: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_bind_config’:
      drivers/usb/gadget/f_mass_storage.c:3093:2: error: implicit declaration of function ‘usb_add_function’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_configuration’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3103:9: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_add’:
      drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 1 of ‘fsg_bind_config’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
      drivers/usb/gadget/f_mass_storage.c:3105:2: warning: passing argument 2 of ‘fsg_bind_config’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:3065:12: note: expected ‘struct usb_configuration *’ but argument is of type ‘struct usb_configuration *’
      drivers/usb/gadget/f_mass_storage.c: At top level:
      drivers/usb/gadget/f_mass_storage.c:3190:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3195:23: warning: ‘struct usb_composite_dev’ declared inside parameter list
      drivers/usb/gadget/f_mass_storage.c:3193:1: error: conflicting types for ‘fsg_common_from_params’
      drivers/usb/gadget/f_mass_storage.c:3188:1: note: previous declaration of ‘fsg_common_from_params’ was here
      drivers/usb/gadget/f_mass_storage.c: In function ‘fsg_common_from_params’:
      drivers/usb/gadget/f_mass_storage.c:3199:2: warning: passing argument 2 of ‘fsg_common_init’ from incompatible pointer type
      drivers/usb/gadget/f_mass_storage.c:2741:27: note: expected ‘struct usb_composite_dev *’ but argument is of type ‘struct usb_composite_dev *’
      make[1]: *** [drivers/usb/gadget/f_mass_storage.o] Error 1
      make: *** [drivers/usb/gadget/f_mass_storage.o] Error 2
      
      This is due to the missing include of linux/usb/composite.h - this patch
      adds the missing include.
      
      In addition there's also a problem in fsg_common_init() where we memset
      'common', but we use the size of a pointer to 'struct fsg_common' as the
      size argument to memset(), not the actual size of the struct. This patch
      fixes the sizeof so we zero the entire struct as intended.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a283c03a
    • P
      USB: Fix trout build failure with ci13xxx_msm gadget · 8cf28f1f
      Pavankumar Kondeti 提交于
      This patch fixes the below compilation errors.
      
        CC      drivers/usb/gadget/ci13xxx_msm.o
        CC      net/mac80211/led.o
        drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
        drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function)
        drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once
        drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.)
        drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
      make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
      make[3]: *** [drivers/usb/gadget] Error 2
      
      MSM USB driver is not supported on boards like trout (MSM7201) which
      has an external PHY.
      Signed-off-by: NPavankumar Kondeti <pkondeti@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8cf28f1f
  2. 04 2月, 2011 1 次提交
  3. 23 1月, 2011 8 次提交
  4. 03 1月, 2011 1 次提交
  5. 24 12月, 2010 1 次提交
    • T
      usb: don't use flush_scheduled_work() · 569ff2de
      Tejun Heo 提交于
      flush_scheduled_work() is being deprecated.  Directly flush or cancel
      work items instead.
      
      * u_ether, isp1301_omap, speedtch conversions are straight-forward.
      
      * ochi-hcd should only flush when quirk_nec() is true as otherwise the
        work wouldn't have been initialized.
      
      * In oti6858, cancel_delayed_work() + flush_scheduled_work() ->
        cancel_delayed_work_sync().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Duncan Sands <duncan.sands@free.fr>
      Cc: linux-usb@vger.kernel.org
      569ff2de
  6. 17 12月, 2010 7 次提交
  7. 11 12月, 2010 14 次提交
  8. 10 12月, 2010 1 次提交
  9. 04 12月, 2010 1 次提交
    • R
      usb: g_audio: Fix crash at driver removal · df4fedea
      Richard Röjfors 提交于
      If g_audio fails to open the sound control device, it crashes at removal:
      
      Insertion:
      [ 4143.836536] g_audio gadget: unable to open sound control device file: /dev/snd/controlC0
      [ 4143.836543] g_audio gadget: we need at least one control device
      [ 4143.836551] g_audio gadget: Linux USB Audio Gadget, version: Dec 18, 2008
      [ 4143.836558] g_audio gadget: g_audio ready
      
      Removal:
      [ 4146.802643] BUG: unable to handle kernel paging request at 00023018
      [ 4146.802655] IP: [<c10af9f5>] filp_close+0xa/0x5b
      [ 4146.802674] *pdpt = 0000000015426001 *pde = 0000000000000000
      [ 4146.802684] Oops: 0000 [#1] PREEMPT SMP
      [ 4146.802692] last sysfs file: /sys/power/state
      [ 4146.802701] Modules linked in: g_audio(-) ioh_udc fuse asix usbnet [last unloaded: g_audio]
      [ 4146.802719]
      [ 4146.802728] Pid: 1394, comm: rmmod Not tainted 2.6.33.5-26.1-ivi #1 To be filled by O.E.M./To be filled by O.E.M.
      [ 4146.802738] EIP: 0060:[<c10af9f5>] EFLAGS: 00010206 CPU: 0
      [ 4146.802746] EIP is at filp_close+0xa/0x5b
      [ 4146.802753] EAX: 00023000 EBX: 00023000 ECX: 00000046 EDX: df842680
      [ 4146.802760] ESI: e071cd4c EDI: df842680 EBP: ddbbbef0 ESP: ddbbbee4
      [ 4146.802768]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      [ 4146.802776] Process rmmod (pid: 1394, ti=ddbba000 task=dd95a4f0 task.ti=ddbba000)
      [ 4146.802782] Stack:
      [ 4146.802787]  d540c280 e071cd4c df2bc000 ddbbbefc e071b82c df11e440 ddbbbf04 e071c622
      [ 4146.802804] <0> ddbbbf28 e071c47f 00000008 e071cd74 df11e464 df2bc01c df2bc000 e071ce68
      [ 4146.802822] <0> 00000880 ddbbbf38 e07fd1b8 e071cef0 00000000 ddbbbf40 e071b9f4 ddbbbf48
      [ 4146.802842] Call Trace:
      [ 4146.802857]  [<e071b82c>] ? gaudio_cleanup+0x87/0xe0 [g_audio]
      [ 4146.802869]  [<e071c622>] ? audio_unbind+0x8/0xc [g_audio]
      [ 4146.802881]  [<e071c47f>] ? composite_unbind+0x8d/0xcb [g_audio]
      [ 4146.802895]  [<e07fd1b8>] ? usb_gadget_unregister_driver+0x7b/0xc0 [ioh_udc]
      [ 4146.802908]  [<e071b9f4>] ? usb_composite_unregister+0x15/0x17 [g_audio]
      [ 4146.802920]  [<e071c633>] ? cleanup+0xd/0xf [g_audio]
      [ 4146.802932]  [<c105a938>] ? sys_delete_module+0x185/0x1dd
      [ 4146.802944]  [<c101c3ea>] ? do_page_fault+0x248/0x276
      [ 4146.802956]  [<c10027d0>] ? sysenter_do_call+0x12/0x26
      [ 4146.802962] Code: 12 5f 3a 00 8b 43 04 8b 40 0c 0f b3 30 3b 73 44 73 03 89 73 44 89 f8 e8 f1 61 3a 00 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 53 89 c3 <8b> 40 18 85 c0 75 0f 68 32 15 5e c1 31 f6 e8 52 39 3a 00 5a eb
      [ 4146.803058] EIP: [<c10af9f5>] filp_close+0xa/0x5b SS:ESP 0068:ddbbbee4
      [ 4146.803071] CR2: 0000000000023018
      [ 4146.803112] ---[ end trace 0989a7e023da0434 ]---
      
      This patch makes sure not to assign the_card if gaudio_open_snd_dev fails,
      since the parent function will deallocate the card.
      
      Also make sure all filp's in gaudio_open_snd_dev is assigned NULL upon error
      and gaudio_close_snd_dev only cleanups when the filp's are non-NULL.
      Signed-off-by: NRichard Röjfors <richard.rojfors@pelagicore.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      df4fedea
  10. 03 12月, 2010 1 次提交
  11. 01 12月, 2010 3 次提交