19 Mar, 2014

1 commit


31 Jul, 2013

1 commit


12 Jun, 2013

1 commit

  • The driver core clears the driver data to NULL after device_release
    or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound).
    Thus, it is not needed to manually clear the device driver data to NULL.

    Signed-off-by: Jingoo Han
    Acked-by: Lee Jones
    Signed-off-by: Samuel Ortiz

    Jingoo Han
     

14 Sep, 2012

1 commit

  • Platform data for device drivers should be defined in
    include/linux/platform_data/*.h, not in the architecture
    and platform specific directories.

    This moves such data out of the sa1100 include directories

    Signed-off-by: Arnd Bergmann
    Acked-by: Mark Brown
    Acked-by: Greg Kroah-Hartman
    Acked-by: Nicolas Pitre
    Cc: Samuel Ortiz
    Cc: Jochen Friedrich

    Arnd Bergmann
     

29 Mar, 2012

2 commits

  • …m/linux/kernel/git/dhowells/linux-asm_system

    Pull "Disintegrate and delete asm/system.h" from David Howells:
    "Here are a bunch of patches to disintegrate asm/system.h into a set of
    separate bits to relieve the problem of circular inclusion
    dependencies.

    I've built all the working defconfigs from all the arches that I can
    and made sure that they don't break.

    The reason for these patches is that I recently encountered a circular
    dependency problem that came about when I produced some patches to
    optimise get_order() by rewriting it to use ilog2().

    This uses bitops - and on the SH arch asm/bitops.h drags in
    asm-generic/get_order.h by a circuituous route involving asm/system.h.

    The main difficulty seems to be asm/system.h. It holds a number of
    low level bits with no/few dependencies that are commonly used (eg.
    memory barriers) and a number of bits with more dependencies that
    aren't used in many places (eg. switch_to()).

    These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

    Move memory barriers here. This already done for MIPS and Alpha.

    (2) asm/switch_to.h

    Move switch_to() and related stuff here.

    (3) asm/exec.h

    Move arch_align_stack() here. Other process execution related bits
    could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

    Move xchg() and cmpxchg() here as they're full word atomic ops and
    frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

    Move die() and related bits.

    (6) asm/auxvec.h

    Move AT_VECTOR_SIZE_ARCH here.

    Other arch headers are created as needed on a per-arch basis."

    Fixed up some conflicts from other header file cleanups and moving code
    around that has happened in the meantime, so David's testing is somewhat
    weakened by that. We'll find out anything that got broken and fix it..

    * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
    Delete all instances of asm/system.h
    Remove all #inclusions of asm/system.h
    Add #includes needed to permit the removal of asm/system.h
    Move all declarations of free_initmem() to linux/mm.h
    Disintegrate asm/system.h for OpenRISC
    Split arch_align_stack() out from asm-generic/system.h
    Split the switch_to() wrapper out of asm-generic/system.h
    Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
    Create asm-generic/barrier.h
    Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
    Disintegrate asm/system.h for Xtensa
    Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
    Disintegrate asm/system.h for Tile
    Disintegrate asm/system.h for Sparc
    Disintegrate asm/system.h for SH
    Disintegrate asm/system.h for Score
    Disintegrate asm/system.h for S390
    Disintegrate asm/system.h for PowerPC
    Disintegrate asm/system.h for PA-RISC
    Disintegrate asm/system.h for MN10300
    ...

    Linus Torvalds
     
  • Remove all #inclusions of asm/system.h preparatory to splitting and killing
    it. Performed with the following command:

    perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`

    Signed-off-by: David Howells

    David Howells
     

19 Feb, 2012

3 commits


04 Feb, 2012

7 commits

  • The genirq code requires early access to interrupt controllers. In
    order to allow this, we need to resume the MCP via the _noirq methods
    instead of the standard methods.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • Convert the sa11x0 MCP driver to use dev_pm_ops rather than the legacy
    members in the platform driver.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use
    platform resources.) by Jochen Friedrich , and fixes
    applied.

    We can safely do this now that we have sanitized host removal; the
    original patch had use-after-free bugs in the removal code. Not only
    that, but there was no checking of the ioremap() return.

    The final change over Jochen's patch is that we wrap the base pointer
    selection inside the various register indexes, which reduces the
    possibility of the wrong register index being used.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • Patch partly taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to
    use platform resources.) by Jochen Friedrich

    Move the MODULE_ALIAS() alongside the other MODULE_* definitions, and
    use DRIVER_NAME to ensure that the driver is consistently named.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • Patch taken from af9081ae64 (ARM: sa1100: Refactor mcp-sa11x0 to use
    platform resources.) by Jochen Friedrich , and
    consolidated to use a common function.

    Move the setup of the PPC unit out of mcp-sa11x0 into the core SA11x0
    code, and call it from each platforms initialization file. This
    centralizes the setup of the PPC unit while not polluting the mcp-sa11x0
    driver with these details.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • The dma_device_t variables are only ever written to by mcp-sa11x0 and
    never read. As the old SA11x0 DMA support will be removed, remove
    these so that it no longer depends on the old SA11x0 DMA definitions.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     
  • host_unregister() gives us no chance between removing the device
    and the mcp data structure being freed to access the data inbetween,
    which drivers may need to do if they need to iounmap() pointers in
    their private data structures.

    Therefore, re-jig the interfaces, which are now, on creation:

    mcp = mcp_host_alloc()
    if (mcp) {
    ret = mcp_host_add(mcp, data);

    if (!ret)
    mcp_host_free(mcp);
    }

    and on removal:

    mcp_host_del(mcp);
    ... access mcp ...
    mcp_host_free(mcp);

    The free does the final put_device() on the struct device as one would
    expect.

    Acked-by: Jochen Friedrich
    Signed-off-by: Russell King

    Russell King
     

21 Jan, 2012

2 commits

  • This reverts commit 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.

    Conflicts:

    scripts/mod/file2alias.c

    This change is wrong on many levels. First and foremost, it causes a
    regression. On boot on Assabet, which this patch gives a codec id of
    'ucb1x00', it gives:

    ucb1x00 ID not found: 1005

    0x1005 is a valid ID for the UCB1300 device.

    Secondly, this patch is way over the top in terms of complexity. The
    only device which has been seen to be connected with this MCP code is
    the UCB1x00 (UCB1200, UCB1300 etc) devices, and they all use the same
    driver. Adding a match table, requiring the codec string to match the
    hardware ID read out of the ID register, etc is completely over the top
    when we can just read the hardware ID register.

    Russell King
     
  • This reverts commit af9081ae64b941d32239b947882cd59ba855c5db.

    This revert is necessary to revert 5dd7bf59e0e8563265b3e5b33276099ef628fcc7.

    Russell King
     

09 Jan, 2012

3 commits


30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

28 Nov, 2009

2 commits


30 Nov, 2008

1 commit

  • When ISA_DMA_API is unset, we're not implementing the ISA DMA API,
    so there's no point in publishing the prototypes via asm/dma.h, nor
    including the machine dependent parts of that API.

    This allows us to remove a lot of mach/dma.h files which don't contain
    any useful code. Unfortunately though, some platforms put their own
    private non-ISA definitions into mach/dma.h, so we leave these behind
    and fix the appropriate #include statments.

    Signed-off-by: Russell King

    Russell King
     

07 Aug, 2008

2 commits


26 Jul, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf (platform: prefix MODALIAS
    with "platform:"), the platform modalias is prefixed with "platform:".
    Add MODULE_ALIAS() to the MFD platform drivers, to re-enable auto loading.

    [dbrownell@users.sourceforge.net: one was missing]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: "Rafael J. Wysocki"
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

10 Nov, 2005

1 commit


30 Oct, 2005

1 commit


29 Oct, 2005

1 commit

  • In PM v1, all devices were called at SUSPEND_DISABLE level. Then
    all devices were called at SUSPEND_SAVE_STATE level, and finally
    SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
    compatibility for platform devices, I arranged for the PM v2
    suspend/resume callbacks to call the old PM v1 suspend/resume
    callbacks three times with each level in order so that existing
    drivers continued to work.

    Since this is obsolete infrastructure which is no longer necessary,
    we can remove it. Here's an (untested) patch to do exactly that.

    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     

18 Aug, 2005

2 commits