1. 19 5月, 2011 1 次提交
    • G
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely 提交于
      Commit b826291c, "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b1608d69
  2. 14 4月, 2011 1 次提交
  3. 01 3月, 2011 1 次提交
  4. 23 10月, 2010 1 次提交
  5. 06 8月, 2010 1 次提交
  6. 01 8月, 2010 1 次提交
    • G
      of/address: Clean up function declarations · 22ae782f
      Grant Likely 提交于
      This patch moves the declaration of of_get_address(), of_get_pci_address(),
      and of_pci_address_to_resource() out of arch code and into the common
      linux/of_address header file.
      
      This patch also fixes some of the asm/prom.h ordering issues.  It still
      includes some header files that it ideally shouldn't be, but at least the
      ordering is consistent now so that of_* overrides work.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      22ae782f
  7. 03 6月, 2010 1 次提交
  8. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  9. 03 3月, 2010 1 次提交
    • N
      USB gadget: make Open Firmware device id constant · 07824d3d
      Németh Márton 提交于
      The match_table field of the struct of_device_id is constant in <linux/of_platform.h>
      so it is worth to make ace_of_match also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NNémeth Márton <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      07824d3d
  10. 23 9月, 2009 1 次提交
  11. 10 2月, 2009 6 次提交
  12. 08 1月, 2009 1 次提交
  13. 07 1月, 2009 1 次提交
  14. 01 12月, 2008 1 次提交
    • A
      USB: fsl_qe_udc: Report disconnect before unbinding · 9ac36da3
      Anton Vorontsov 提交于
      Gadgets disable endpoints in their disconnect callbacks, so
      we must call disconnect before unbinding. This also fixes
      muram memory leak, since we free muram in the qe_ep_disable().
      
      But mainly the patch fixes following badness:
      
      root@b1:~# insmod fsl_qe_udc.ko
      fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0
      fsl_qe_udc e01006c0.usb: QE USB controller initialized as device
      root@b1:~# insmod g_ether.ko
      g_ether gadget: using random self ethernet address
      g_ether gadget: using random host ethernet address
      usb0: MAC be:2d:3c:fa:be:f0
      usb0: HOST MAC 62:b8:6a:df:38:66
      g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
      g_ether gadget: g_ether ready
      fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether
      g_ether gadget: high speed config #1: CDC Ethernet (ECM)
      root@b1:~# rmmod g_ether.ko
      ------------[ cut here ]------------
      Badness at drivers/usb/gadget/composite.c:871
      [...]
      NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether]
      LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
      Call Trace:
      [cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable)
      [cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
      [cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether]
      [cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c
      [cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38
      [...]
      fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether'
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9ac36da3
  15. 18 10月, 2008 3 次提交