1. 16 11月, 2012 1 次提交
  2. 29 9月, 2012 1 次提交
  3. 10 1月, 2012 1 次提交
  4. 11 9月, 2011 3 次提交
  5. 25 5月, 2011 1 次提交
  6. 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
  7. 11 3月, 2011 1 次提交
  8. 01 3月, 2011 1 次提交
  9. 04 12月, 2010 1 次提交
  10. 25 10月, 2010 2 次提交
  11. 29 9月, 2010 1 次提交
  12. 18 8月, 2010 1 次提交
  13. 06 8月, 2010 1 次提交
  14. 03 6月, 2010 1 次提交
    • J
      drivers/mtd/maps: introduce missing kfree · 00b275db
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      00b275db
  15. 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
  16. 19 5月, 2010 1 次提交
  17. 14 5月, 2010 1 次提交
  18. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  19. 02 1月, 2010 1 次提交
  20. 20 9月, 2009 1 次提交
  21. 04 9月, 2009 2 次提交
  22. 06 6月, 2009 1 次提交
    • S
      mtd: physmap_of: Add multiple regions and concatenation support · 143070e7
      Stefan Roese 提交于
      This patch adds support to handle multiple non-identical chips in one
      flash device tree node. It also adds concat support to physmap_of. This
      makes it possible to support e.g. the Intel P30 48F4400 chips which
      internally consists of 2 non-identical NOR chips on one die. Additionally
      partitions now can span over multiple chips.
      
      To describe such a chip's, multiple "reg" tuples are now supported in one
      flash device tree node. Here an dts example:
      
              flash@f0000000,0 {
                      #address-cells = <1>;
                      #size-cells = <1>;
                      compatible = "cfi-flash";
                      reg = <0 0x00000000 0x02000000
                             0 0x02000000 0x02000000>;
                      bank-width = <2>;
                      partition@0 {
                              label = "test-part1";
                              reg = <0 0x04000000>;
                      };
              };
      Signed-off-by: NStefan Roese <sr@denx.de>
      Reviewed-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      143070e7
  23. 06 4月, 2009 1 次提交
  24. 07 1月, 2009 1 次提交
  25. 23 12月, 2008 1 次提交
  26. 13 10月, 2008 1 次提交
  27. 03 2月, 2008 1 次提交
  28. 30 10月, 2007 1 次提交
  29. 20 9月, 2007 2 次提交
    • D
      [POWERPC] Cleanups for physmap_of.c (v2) · c4d5e375
      David Gibson 提交于
      This patch includes a whole batch of smallish cleanups for
      drivers/mtd/physmap_of.c.
      
      	- A bunch of uneeded #includes are removed
      	- We switch to the modern linux/of.h etc. in place of
      asm/prom.h
      	- Use some helper macros to avoid some ugly inline #ifdefs
      	- A few lines of unreachable code are removed
      	- A number of indentation / line-wrapping fixes
      	- More consistent use of kernel idioms such as if (!p) instead
      of if (p == NULL)
      	- Clarify some printk()s and other informative strings.
      	- parse_obsolete_partitions() now returns 0 if no partition
      information is found, instead of returning -ENOENT which the caller
      had to handle specially.
      	- (the big one) Despite the name, this driver really has
      nothing to do with drivers/mtd/physmap.c.  The fact that the flash
      chips must be physically direct mapped is a constrant, but doesn't
      really say anything about the actual purpose of this driver, which is
      to instantiate MTD devices based on information from the device tree.
      Therefore the physmap name is replaced everywhere within the file with
      "of_flash".  The file itself and the Kconfig option is not renamed for
      now (so that the diff is actually a diff).  That can come later.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      c4d5e375
    • J
      [POWERPC] Make partitions optional in physmap_of · 8d9ae994
      Josh Boyer 提交于
      The latest physmap_of driver has a small error where it will fail the probe
      with:
      
      physmap-flash: probe of fff00000.small-flas failed with error -2
      
      if there are no partition subnodes in the device tree and the old style binding
      is not used.  Since partition definitions are optional, the probe should still
      succeed.
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      8d9ae994
  30. 13 9月, 2007 1 次提交
  31. 01 8月, 2007 1 次提交
  32. 09 5月, 2007 1 次提交
  33. 02 5月, 2007 1 次提交
  34. 26 4月, 2007 1 次提交
  35. 13 4月, 2007 1 次提交