1. 22 7月, 2015 1 次提交
    • B
      mtd: m25p80: allow arbitrary OF matching for "jedec,spi-nor" · 43163022
      Brian Norris 提交于
      When we added the "jedec,spi-nor" compatible string for use in this
      driver, we added it as a modalias option. The modalias can be derived in
      different ways for platform devices vs. device tree (of_*) matching. But
      for device tree matching (the primary target of this identifier string),
      the modalias is determined from the first entry in the 'compatible'
      property. IOW, the following properties would bind to this driver:
      
      	// Option (a), modalias = "spi-nor"
      	compatible = "jedec,spi-nor";
      
      	// Option (b), modalias = "spi-nor"
      	compatible = "idontknowwhatimdoing,spi-nor";
      
      But the following would not:
      
      	// Option (c), modalias = "shinynewdevice"
      	compatible = "myvendor,shinynewdevice", "jedec,spi-nor";
      
      So, we'd like to match (a) and (c) (even when we don't have an explicit
      entry for "shinynewdevice"), and we'd rather not allow (b).
      
      To do this, we
        (1) always (for devices without specific platform data) pass the
            modalias to the spi-nor library;
        (2) rework the spi-nor library to not reject "bad" names, and
            instead just fall back to autodetection; and
        (3) add the .of_match_table to properly catch all "jedec,spi-nor".
      
      This allows (a) and (c) without warnings, and rejects (b).
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      43163022
  2. 21 7月, 2015 6 次提交
  3. 07 7月, 2015 2 次提交
  4. 24 6月, 2015 1 次提交
  5. 17 6月, 2015 8 次提交
  6. 11 6月, 2015 1 次提交
  7. 03 6月, 2015 1 次提交
  8. 02 6月, 2015 9 次提交
  9. 29 5月, 2015 2 次提交
    • U
      mtd: dc21285: use raw spinlock functions for nw_gpio_lock · e5babdf9
      Uwe Kleine-König 提交于
      Since commit bd31b859 (which is in 3.2-rc1) nw_gpio_lock is a raw spinlock
      that needs usage of the corresponding raw functions.
      
      This fixes:
      
        drivers/mtd/maps/dc21285.c: In function 'nw_en_write':
        drivers/mtd/maps/dc21285.c:41:340: warning: passing argument 1 of 'spinlock_check' from incompatible pointer type
          spin_lock_irqsave(&nw_gpio_lock, flags);
      
        In file included from include/linux/seqlock.h:35:0,
                         from include/linux/time.h:5,
                         from include/linux/stat.h:18,
                         from include/linux/module.h:10,
                         from drivers/mtd/maps/dc21285.c:8:
        include/linux/spinlock.h:299:102: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
         static inline raw_spinlock_t *spinlock_check(spinlock_t *lock)
                                                                                                              ^
        drivers/mtd/maps/dc21285.c:43:25: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type
          spin_unlock_irqrestore(&nw_gpio_lock, flags);
                                 ^
        In file included from include/linux/seqlock.h:35:0,
                         from include/linux/time.h:5,
                         from include/linux/stat.h:18,
                         from include/linux/module.h:10,
                         from drivers/mtd/maps/dc21285.c:8:
        include/linux/spinlock.h:370:91: note: expected 'struct spinlock_t *' but argument is of type 'struct raw_spinlock_t *'
         static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
      
      Fixes: bd31b859 ("locking, ARM: Annotate low level hw locks as raw")
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      e5babdf9
    • B
      mtd: chips: fixup dependencies, to prevent build error · bde90062
      Brian Norris 提交于
      Commit 4612c715 ("mtd: cfi: deinline large functions") moved some
      code into the cfi_util library without creating a new dependency. So we
      can get build failures like the following, when CONFIG_MTD_JEDECPROBE=y
      and CONFIG_MTD_CFI_UTIL=m.
      
         drivers/built-in.o: In function `jedec_read_id':
      >> jedec_probe.c:(.text+0x187ed8): undefined reference to `cfi_build_cmd_addr'
         drivers/built-in.o: In function `jedec_read_mfr':
      >> jedec_probe.c:(.text+0x187f4a): undefined reference to `cfi_build_cmd_addr'
         drivers/built-in.o: In function `jedec_reset':
      >> jedec_probe.c:(.text+0x187fe0): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x188004): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x18802b): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x18804e): undefined reference to `cfi_send_gen_cmd'
         drivers/built-in.o: In function `jedec_probe_chip':
      >> jedec_probe.c:(.text+0x188130): undefined reference to `cfi_build_cmd_addr'
      >> jedec_probe.c:(.text+0x18814d): undefined reference to `cfi_build_cmd_addr'
      >> jedec_probe.c:(.text+0x1881dc): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x188203): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x18822d): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x1884c0): undefined reference to `cfi_send_gen_cmd'
      >> jedec_probe.c:(.text+0x1884e7): undefined reference to `cfi_send_gen_cmd'
         drivers/built-in.o:jedec_probe.c:(.text+0x188511): more undefined references to `cfi_send_gen_cmd' follow
         drivers/built-in.o: In function `jedec_probe_chip':
      >> jedec_probe.c:(.text+0x188618): undefined reference to `cfi_build_cmd'
      
      So let's express the dependency properly.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      bde90062
  10. 28 5月, 2015 5 次提交
    • L
      kernel/params: constify struct kernel_param_ops uses · 9c27847d
      Luis R. Rodriguez 提交于
      Most code already uses consts for the struct kernel_param_ops,
      sweep the kernel for the last offending stragglers. Other than
      include/linux/moduleparam.h and kernel/params.c all other changes
      were generated with the following Coccinelle SmPL patch. Merge
      conflicts between trees can be handled with Coccinelle.
      
      In the future git could get Coccinelle merge support to deal with
      patch --> fail --> grammar --> Coccinelle --> new patch conflicts
      automatically for us on patches where the grammar is available and
      the patch is of high confidence. Consider this a feature request.
      
      Test compiled on x86_64 against:
      
      	* allnoconfig
      	* allmodconfig
      	* allyesconfig
      
      @ const_found @
      identifier ops;
      @@
      
      const struct kernel_param_ops ops = {
      };
      
      @ const_not_found depends on !const_found @
      identifier ops;
      @@
      
      -struct kernel_param_ops ops = {
      +const struct kernel_param_ops ops = {
      };
      
      Generated-by: Coccinelle SmPL
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Junio C Hamano <gitster@pobox.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: cocci@systeme.lip6.fr
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      9c27847d
    • C
      mtd: cfi_cmdset_0002: Initialize datum before calling map_word_load_partial · 636fdbf8
      Christian Riesch 提交于
      In do_otp_write we must initialize the variable datum before calling
      map_word_load_partial. Otherwise the upper bits of datum may be undefined,
      which later causes problems in chip_good called by do_write_oneword.
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      636fdbf8
    • D
      mtd: cfi: deinline large functions · 4612c715
      Denys Vlasenko 提交于
      With this .config: http://busybox.net/~vda/kernel_config,
      after uninlining these functions have sizes and callsite counts
      as follows:
      
      cfi_udelay(): 74 bytes, 26 callsites
      cfi_send_gen_cmd(): 153 bytes, 95 callsites
      cfi_build_cmd(): 274 bytes, 123 callsites
      cfi_build_cmd_addr(): 49 bytes, 15 callsites
      cfi_merge_status(): 230 bytes, 3 callsites
      
      Reduction in code size is about 50,000:
      
          text     data      bss       dec     hex filename
      85842882 22294584 20627456 128764922 7accbfa vmlinux.before
      85789648 22294616 20627456 128711720 7abfc28 vmlinux
      Signed-off-by: NDenys Vlasenko <dvlasenk@redhat.com>
      CC: Dan Carpenter <dan.carpenter@oracle.com>
      CC: Jingoo Han <jg1.han@samsung.com>
      CC: Brian Norris <computersforpeace@gmail.com>
      CC: Aaron Sierra <asierra@xes-inc.com>
      CC: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
      CC: David Woodhouse <David.Woodhouse@intel.com>
      CC: linux-mtd@lists.infradead.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      4612c715
    • B
      mtd: lantiq-flash: use default partition parsers · c3c263a8
      Brian Norris 提交于
      The default implementation already probes for cmdlinepart and ofpart.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      c3c263a8
    • B
      mtd: plat_nand: use default partition probe · 8bf57b0d
      Brian Norris 提交于
      It's harmless to add 'ofpart' (the only different parser supported in
      default mtdpart.c) to plat_nand. That let's us kill off one more custom
      partition prober listing.
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      8bf57b0d
  11. 23 5月, 2015 2 次提交
  12. 22 5月, 2015 2 次提交