1. 10 5月, 2013 22 次提交
    • I
      ARM: EXYNOS5: Fix kernel dump in AFTR idle mode · 08858461
      Inderpal Singh 提交于
      The kernel crashes while resuming from AFTR idle mode. It happens
      because L2 cache was not going into retention state.
      
      This patch configures the USE_RETENTION bit of ARM_L2_OPTION register
      so that it does not depend on MANUAL_L2RSTDISABLE_CONTROL of
      ARM_COMMON_OPTION register for L2RSTDISABLE signal.
      Signed-off-by: NInderpal Singh <inderpal.singh@linaro.org>
      Tested-by: NChander Kashyap <chander.kashyap@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      08858461
    • O
      Merge tag 'omap-for-v3.10/dt-fixes-for-merge-window' of... · 6e6a3af7
      Olof Johansson 提交于
      Merge tag 'omap-for-v3.10/dt-fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      Omap device tree fixes for issue discovered during the merge window:
      
      - Fix triggering for GPIO interrupts that's needed for 4430sdp
        Ethernet. Otherwise booting with nfsroot won't work.
      - Fix CPU operating point values
      - Fix wrong assumption that twl PMIC is always connected to omap3
      - Add gpmc for am33xx so beaglebone users can use the bus
      - Cosmetic fix for mcspi pin muxing to avoid confusion
      
      * tag 'omap-for-v3.10/dt-fixes-for-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: don't assume boards are using twl4030 for omap3
        ARM: dts: Configure and fix the McSPI pins for 4430sdp
        ARM: dts: AM33XX: Add GPMC node
        ARM: dts: OMAP4460: Fix CPU OPP voltages
        ARM: dts: OMAP36xx: Fix CPU OPP voltages
        ARM: dts: OMAP4: Fix ethernet IRQ for OMAP4 boards
      6e6a3af7
    • O
      Merge tag 'omap-for-v3.10/fixes-for-merge-window-part2' of... · 474dbaa7
      Olof Johansson 提交于
      Merge tag 'omap-for-v3.10/fixes-for-merge-window-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      Omap fixes for things that were discovered during the merge window:
      
      - Few GPMC fixes and binding doc updates noted after sending
        pull requests for the GPMC branch.
      - Board fixes for beagle usb host and rx51 spi probe order
      - SoC fixes dt earlyprintk, omap1 dma and omap2+ id.c error
        handling fixes
      
      Then few minor things that are not strictly fixes but are good
      to get out of the way:
      
      - Add missing legacy mux registers for am/dm73x gpio
      - Add detection for am33xx pg2.1 silicon
      - Enable twl4030 audio modules in defconfig
      
      * tag 'omap-for-v3.10/fixes-for-merge-window-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP2+: Remove bogus IS_ERR_OR_NULL checking from id.c
        ARM: OMAP4+: omap2plus_defconfig: Enable audio via TWL6040 as module
        ARM: OMAP2: AM33XX: id: Add support for new AM335x PG2.1 Si
        omap: mux: add AM/DM37x gpios
        ARM: OMAP1: DMA: fix error handling in omap1_system_dma_init()
        ARM: OMAP2+: omap_device: use late_initcall_sync
        ARM: OMAP: RX-51: change probe order of touchscreen and panel SPI devices
        ARM: OMAP3: Beagle: Fix USB Host on beagle xM Ax/Bx
        ARM: OMAP2+: only WARN if a GPMC child probe function fail
        ARM: OMAP2+: only search for GPMC DT child nodes on probe
        Documentation: dt: update properties in TI GPMC NAND example
        Documentation: dt: update TI GPMC ethernet binding properties
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      474dbaa7
    • L
      ARM: ux500: Rid ignored return value of regulator_enable() compiler warning · 27d4cdca
      Lee Jones 提交于
      arch/arm/mach-ux500/board-mop500.c: In function ‘mop500_prox_activate’:
      arch/arm/mach-ux500/board-mop500.c:406:18: warning: ignoring return value of
              ‘regulator_enable’, declared with attribute warn_unused_result
              [-Wunused-result]
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      27d4cdca
    • F
      ARM: ux500: read the correct soc_id number · 33c8abce
      Fabio Baltieri 提交于
      Fix db8500_read_soc_id() to read all five soc_id number locations
      instead of repeating the second one two times.
      Signed-off-by: NFabio Baltieri <fabio.baltieri@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      33c8abce
    • O
      ARM: exynos: dts: cros5250: add cyapa trackpad · ee99ce89
      Olof Johansson 提交于
      Trivial patch, adding the i2c Cypress trackpad used on Snow.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Reviewed-by: NDoug Anderson <dianders@chromium.org>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      ee99ce89
    • F
      video: mxsfb: Adapt to new videomode API · d7321df3
      Fabio Estevam 提交于
      commit 6cd2c7db (videomode: videomode_from_timing work) changed the name of
      the function from videomode_from_timing() to videomode_from_timings().
      
      commit 32ed6ef1 (videomode: create enum for videomode's display flags) changed
      the 'data_flags' field in videomode structure to 'flags'
      
      Adapt to these changes in order to fix the following errors:
      
      drivers/video/mxsfb.c:761:3: error: too many arguments to function 'videomode_from_timing'
      drivers/video/mxsfb.c:761:7: error: void value not ignored as it ought to be
      drivers/video/mxsfb.c:768:9: error: 'struct videomode' has no member named 'data_flags'
      drivers/video/mxsfb.c:770:9: error: 'struct videomode' has no member named 'data_flags'
      
      Also, select VIDEOMODE_HELPER instead of OF_VIDEOMODE, as this one is
      deprecated.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Acked-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      d7321df3
    • F
      ARM: imx: Select GENERIC_ALLOCATOR · 60371952
      Fabio Estevam 提交于
      Since commit 657eee7d (media: coda: use genalloc API) the following build
      error happens with imx_v4_v5_defconfig:
      
      drivers/built-in.o: In function 'coda_remove':
      clk-composite.c:(.text+0x112180): undefined reference to 'gen_pool_free'
      drivers/built-in.o: In function 'coda_probe':
      clk-composite.c:(.text+0x112310): undefined reference to 'of_get_named_gen_pool'
      clk-composite.c:(.text+0x1123f4): undefined reference to 'gen_pool_alloc'
      clk-composite.c:(.text+0x11240c): undefined reference to 'gen_pool_virt_to_phys'
      clk-composite.c:(.text+0x112458): undefined reference to 'dev_get_gen_pool'
      
      Select GENERIC_ALLOCATOR and get rid of the custom IRAM_ALLOC.
      Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      60371952
    • S
      ARM: imx: compile fix for hotplug.c · 009e63f8
      Shawn Guo 提交于
      Commit bca7a5a0 (ARM: cpu hotplug: remove majority of cache flushing
      from platforms) removes include of <asm/cacheflush.h> and hence
      discovers a few indirect inclusion and declaration problems as below.
      
        CC      arch/arm/mach-imx/hotplug.o
      In file included from arch/arm/mach-imx/hotplug.c:16:0:
      arch/arm/mach-imx/common.h:100:29: warning: ‘struct pt_regs’ declared inside parameter list [enabled by default]
      arch/arm/mach-imx/common.h:100:29: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
      arch/arm/mach-imx/common.h:101:29: warning: ‘struct pt_regs’ declared inside parameter list [enabled by default]
      arch/arm/mach-imx/hotplug.c: In function ‘imx_cpu_die’:
      arch/arm/mach-imx/hotplug.c:53:2: error: implicit declaration of function ‘cpu_do_idle’ [-Werror=implicit-function-declaration]
      arch/arm/mach-imx/hotplug.c: In function ‘imx_cpu_kill’:
      arch/arm/mach-imx/hotplug.c:58:26: error: ‘jiffies’ undeclared (first use in this function)
      arch/arm/mach-imx/hotplug.c:58:26: note: each undeclared identifier is reported only once for each function it appears in
      arch/arm/mach-imx/hotplug.c:58:2: error: implicit declaration of function ‘msecs_to_jiffies’ [-Werror=implicit-function-declaration]
      arch/arm/mach-imx/hotplug.c:61:3: error: implicit declaration of function ‘time_after’ [-Werror=implicit-function-declaration]
      
      Fix them by adding the needed inclusion and declaration.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      009e63f8
    • O
      Merge branch 'late/fixes' into fixes · 5497e7b8
      Olof Johansson 提交于
      * late/fixes:
        ARM: OMAP2+: Fix unmet direct dependencies for SERIAL_OMAP
        ARM: ux500: always select ABX500_CORE
        ARM: SIRF: select SMP_ON_UP only on SMP builds
        ARM: SPEAr: conditionalize l2x0 support
        ARM: imx: build CPU suspend code only when needed
        ARM: OMAP: build SMP code only for OMAP4/5
        ARM: tegra: Tegra114 needs CPU_FREQ_TABLE
        ARM: default machine descriptor for multiplatform
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      5497e7b8
    • L
      Merge tag 'nfs-for-3.10-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8cbc95ee
      Linus Torvalds 提交于
      Pull more NFS client bugfixes from Trond Myklebust:
      
       - Ensure that we match the 'sec=' mount flavour against the server list
      
       - Fix the NFSv4 byte range locking in the presence of delegations
      
       - Ensure that we conform to the NFSv4.1 spec w.r.t.  freeing lock
         stateids
      
       - Fix a pNFS data server connection race
      
      * tag 'nfs-for-3.10-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS4.1 Fix data server connection race
        NFSv3: match sec= flavor against server list
        NFSv4.1: Ensure that we free the lock stateid on the server
        NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call
        SUNRPC: Don't spam syslog with "Pseudoflavor not found" messages
        NFSv4.x: Fix handling of partially delegated locks
      8cbc95ee
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ea44083a
      Linus Torvalds 提交于
      Pull networking update from David Miller:
      
       1) Propagate return error values properly in irda, spider_net, sfc, and
          bfin_mac.  From Wei Yongjun.
      
       2) Fix fec driver OOPS on rapid link up/down, from Frank Li.
      
       3) FIX VF resource allocation and chip message payload length errors in
          be2net driver, from Sathya Perla.
      
       4) Fix inner protocol inspection during GSO from Pravin B Shelar.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        if_cablemodem.h: Add parenthesis around ioctl macros
        gso: Handle Trans-Ether-Bridging protocol in skb_network_protocol()
        net: fec: fix kernel oops when plug/unplug cable many times
        bfin_mac: fix error return code in bfin_mac_probe()
        sfc: fix return value check in efx_ptp_probe_channel()
        net/spider_net: fix error return code in spider_net_open()
        net/irda: fix error return code in bfin_sir_open()
        net: of_mdio: fix behavior on missing phy device
        sierra_net: keep status interrupt URB active
        usbnet: allow status interrupt URB to always be active
        qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN card
        be2net: disable TX in be_close()
        be2net: fix EQ from getting full while cleaning RX CQ
        be2net: fix payload_len value for GET_MAC_LIST cmd req
        be2net: provision VF resources before enabling SR-IOV
      ea44083a
    • L
      Merge tag 'pci-v3.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · e15e6119
      Linus Torvalds 提交于
      Pull PCI updates from Bjorn Helgaas:
       "MSI:
            PCI: Set ->mask_pos correctly
        Hotplug:
            PCI: Delay final fixups until resources are assigned
        Moorestown:
            x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0"
      
      * tag 'pci-v3.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Delay final fixups until resources are assigned
        x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0
        PCI: Set ->mask_pos correctly
      e15e6119
    • L
      Merge tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd · a637b0d4
      Linus Torvalds 提交于
      Pull MTD update from David Woodhouse:
      
       - Lots of cleanups from Artem, including deletion of some obsolete
         drivers
      
       - Support partitions larger than 4GiB in device tree
      
       - Support for new SPI chips
      
      * tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd: (83 commits)
        mtd: omap2: Use module_platform_driver()
        mtd: bf5xx_nand: Use module_platform_driver()
        mtd: denali_dt: Remove redundant use of of_match_ptr
        mtd: denali_dt: Change return value to fix smatch warning
        mtd: denali_dt: Use module_platform_driver()
        mtd: denali_dt: Fix incorrect error check
        mtd: nand: subpage write support for hardware based ECC schemes
        mtd: omap2: use msecs_to_jiffies()
        mtd: nand_ids: use size macros
        mtd: nand_ids: improve LEGACY_ID_NAND macro a bit
        mtd: add 4 Toshiba nand chips for the full-id case
        mtd: add the support to parse out the full-id nand type
        mtd: add new fields to nand_flash_dev{}
        mtd: sh_flctl: Use of_match_ptr() macro
        mtd: gpio: Use of_match_ptr() macro
        mtd: gpio: Use devm_kzalloc()
        mtd: davinci_nand: Use of_match_ptr()
        mtd: dataflash: Use of_match_ptr() macro
        mtd: remove h720x flash support
        mtd: onenand: remove OneNAND simulator
        ...
      a637b0d4
    • L
      Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 · f78089e8
      Linus Torvalds 提交于
      Pull firewure updates from Stefan Richter:
        - fix controller removal when controller is in suspended state
        - fix video reception on VIA VT6306 with gstreamer, MythTV, and maybe dv4l
        - fix a startup issue with Agere/LSI FW643-e2
        - error logging improvements and other small updates
      
      * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
        firewire: ohci: dump_stack() for PHY regs read/write failures
        firewire: ohci: Improve bus reset error messages
        firewire: ohci: Alias dev_* log functions
        firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8
        firewire: ohci: fix VIA VT6306 video reception
        firewire: ohci: Check LPS before register access on pci removal
        firewire: ohci: Fix double free_irq()
        firewire: remove unnecessary alloc/OOM messages
        firewire: sbp2: replace BUG_ON by WARN_ON
        firewire: core: remove an always false test
        firewire: Remove two unneeded checks for macros
      f78089e8
    • L
      Merge tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 7462543a
      Linus Torvalds 提交于
      Pull two small EDAC fixes from Borislav Petkov.
      
      * tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC: Don't give write permission to read-only files
        EDAC, mc_sysfs.c: Fix string array pointer types
      7462543a
    • L
      Merge git://www.linux-watchdog.org/linux-watchdog · bde9d73d
      Linus Torvalds 提交于
      Pull watchdog update from Wim Van Sebroeck:
       "Fix a kdump issue in hpwdt and a possible NULL dereference"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: Fix race condition in registration code
        watchdog: Convert to devm_ioremap_resource()
      bde9d73d
    • L
      Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux · 5647ac0a
      Linus Torvalds 提交于
      Pull removal of GENERIC_GPIO from Grant Likely:
       "GENERIC_GPIO now synonymous with GPIOLIB.  There are no longer any
        valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
        is possible to do so which has been causing confusion and breakage.
        This branch does the work to completely eliminate GENERIC_GPIO."
      
      * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
        gpio: update gpio Chinese documentation
        Remove GENERIC_GPIO config option
        Convert selectors of GENERIC_GPIO to GPIOLIB
        blackfin: force use of gpiolib
        m68k: coldfire: use gpiolib
        mips: pnx833x: remove requirement for GENERIC_GPIO
        openrisc: default GENERIC_GPIO to false
        avr32: default GENERIC_GPIO to false
        xtensa: remove explicit selection of GENERIC_GPIO
        sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
        powerpc: remove redundant GENERIC_GPIO selection
        unicore32: default GENERIC_GPIO to false
        unicore32: remove unneeded select GENERIC_GPIO
        arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
        arm: remove redundant GENERIC_GPIO selection
        mips: alchemy: require gpiolib
        mips: txx9: change GENERIC_GPIO to GPIOLIB
        mips: loongson: use GPIO driver on CONFIG_GPIOLIB
        mips: remove redundant GENERIC_GPIO select
      5647ac0a
    • L
      Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma · 1763e735
      Linus Torvalds 提交于
      Pull slave-dmaengine updates from Vinod Koul:
       "This time we have dmatest improvements from Andy along with dw_dmac
        fixes.  He has also done support for acpi for dmanegine.
      
        Also we have bunch of fixes going in DT support for dmanegine for
        various folks.  Then Haswell and other ioat changes from Dave and
        SUDMAC support from Shimoda."
      
      * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
        dma: tegra: implement suspend/resume callbacks
        dma:of: Use a mutex to protect the of_dma_list
        dma: of: Fix of_node reference leak
        dmaengine: sirf: move driver init from module_init to subsys_initcall
        sudmac: add support for SUDMAC
        dma: sh: add Kconfig
        at_hdmac: move to generic DMA binding
        ioatdma: ioat3_alloc_sed can be static
        ioatdma: Adding write back descriptor error status support for ioatdma 3.3
        ioatdma: S1200 platforms ioatdma channel 2 and 3 falsely advertise RAID cap
        ioatdma: Adding support for 16 src PQ ops and super extended descriptors
        ioatdma: Removing hw bug workaround for CB3.x .2 and earlier
        dw_dmac: add ACPI support
        dmaengine: call acpi_dma_request_slave_channel as well
        dma: acpi-dma: introduce ACPI DMA helpers
        dma: of: Remove unnecessary list_empty check
        DMA: OF: Check properties value before running be32_to_cpup() on it
        DMA: of: Constant names
        ioatdma: skip silicon bug workaround for pq_align for cb3.3
        ioatdma: Removing PQ val disable for cb3.3
        ...
      1763e735
    • L
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · b29bdba5
      Linus Torvalds 提交于
      Pull thermal management update from Zhang Rui:
       "The most important one is to build thermal core and governor and cpu
        cooling code into one module.  This fixes a regression that thermal
        core does not work if it is built as module, since 3.7.  I'll backport
        them to stable kernel once those changes are in upstream.
      
        The largest batch is the thermal kernel-doc & coding style
        updates/cleanups from Eduardo.
      
        Highlights:
      
         - build all thermal framework code into one module to fix a
           regression that thermal does not work if it is built as module.
      
         - Marvell Armada 370/XP thermal sensor driver
      
         - thermal core/cpu cooling kernel-doc & coding style updates and
           cleanups.
      
         - Add Eduardo Valentin as thermal sub-maintainer, both in mailing
           list and patchwork.  He will help me on arm thermal drivers."
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (68 commits)
        thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()
        thermal: thermal_core: remove usage of IS_ERR_OR_NULL
        thermal: cpu_cooling: improve line breaking
        thermal: cpu_cooling: alignment improvements
        thermal: cpu_cooling: remove checkpatch.pl warning
        thermal: cpu_cooling: remove trailing blank line
        thermal: cpu_cooling: align on open parenthesis
        thermal: cpu_cooling: standardize comment style
        thermal: cpu_cooling: standardize end of function
        thermal: cpu_cooling: remove trailing white spaces
        Thermal: update documentation for thermal_zone_device_register
        thermal: update kernel-doc for thermal_zone_device_register
        thermal: update kernel-doc for create_trip_attrs
        thermal: update kernel-doc for thermal_cooling_device_register
        thermal: update kernel-doc for thermal_zone_unbind_cooling_device
        thermal: update kernel-doc for thermal_zone_bind_cooling_device
        thermal: use EXPORT_SYMBOL_GPL
        thermal: rename notify_thermal_framework to thermal_notify_framework
        thermal: update driver license
        thermal: use strlcpy instead of strcpy
        ...
      b29bdba5
    • J
      ARM: dts: don't assume boards are using twl4030 for omap3 · 914dc329
      Jason Cooper 提交于
      If a board isn't using twl4030, then dtc will complain about the missing
      phandle (which is in twl4030.dtsi).  Move the phy declaration to the dts
      files.
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      914dc329
    • T
      ARM: OMAP2+: Remove bogus IS_ERR_OR_NULL checking from id.c · b1dd11d6
      Tony Lindgren 提交于
      Commit 6770b211 (ARM: OMAP2+: Export SoC information to userspace)
      had some broken return value handling as noted by Russell King:
      
      +       soc_dev = soc_device_register(soc_dev_attr);
      +       if (IS_ERR_OR_NULL(soc_dev)) {
      +               kfree(soc_dev_attr);
      +               return;
      +       }
      +
      +       parent = soc_device_to_device(soc_dev);
      +       if (!IS_ERR_OR_NULL(parent))
      +               device_create_file(parent, &omap_soc_attr);
      
      This is nonsense.  For the first, IS_ERR() is sufficient.  For the second,
      tell me what error checking is required in the return value of this
      function:
      
      struct device *soc_device_to_device(struct soc_device *soc_dev)
      {
              return &soc_dev->dev;
      }
      
      when you've already determined that the passed soc_dev is a valid pointer.
      If you read the comments against the prototype:
      
      /**
       * soc_device_to_device - helper function to fetch struct device
       * @soc: Previously registered SoC device container
       */
      struct device *soc_device_to_device(struct soc_device *soc);
      
      if "soc" is valid, it means the "previously registered SoC device container"
      must have succeeded and that can only happen if the struct device has been
      registered.  Ergo, there will always be a valid struct device pointer for
      any registered SoC device container.  Therefore, if soc_device_register()
      succeeds, then the return value from soc_device_to_device() will always be
      valid and no error checking of it is required.
      
      Simples.  The rule as ever applies here: get to know the APIs your using
      and don't fumble around in the dark hoping that you'll get this stuff
      right.
      
      Fix it as noted by Russell.
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      b1dd11d6
  2. 09 5月, 2013 18 次提交