28 Jun, 2011

22 commits

  • Fix this section mismatch:

    WARNING: drivers/misc/ioc4.o(.data+0x144): Section mismatch in reference from the variable ioc4_load_modules_work to the function .devinit.text:ioc4_load_modules()
    The variable ioc4_load_modules_work references
    the function __devinit ioc4_load_modules()
    If the reference is valid then annotate the
    variable with __init* or __refdata (see linux/init.h) or name the variable:
    *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

    This one is potentially fatal; by the time ioc4_load_modules is invoked
    it may already have been freed. For that reason ioc4_load_modules_work
    can't be turned to __devinitdata but also because it's referenced in
    ioc4_exit.

    Signed-off-by: Ralf Baechle
    Acked-by: Brent Casavant
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Fix this section mismatch:

    WARNING: drivers/leds/leds-lp5523.o(.text+0x12f4): Section mismatch in reference from the function lp5523_probe() to the function .init.text:lp5523_init_led()
    The function lp5523_probe() references
    the function __init lp5523_init_led().
    This is often because lp5523_probe lacks a __init
    annotation or the annotation of lp5523_init_led is wrong.

    Fixing this one triggers one more mismatch, fix that one as well.

    Signed-off-by: Ralf Baechle
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Fix this section mismatch:

    WARNING: drivers/leds/leds-lp5521.o(.text+0xf2c): Section mismatch in reference from the function lp5521_probe() to the function .init.text:lp5521_init_led()
    The function lp5521_probe() references
    the function __init lp5521_init_led().
    This is often because lp5521_probe lacks a __init
    annotation or the annotation of lp5521_init_led is wrong.

    Fixing this mismatch triggers one more mismatch, fix that one as well.

    Signed-off-by: Ralf Baechle
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Commit d149e3b25d7c ("memcg: add the soft_limit reclaim in global direct
    reclaim") adds a softlimit hook to shrink_zones(). By this, soft limit
    is called as

    try_to_free_pages()
    do_try_to_free_pages()
    shrink_zones()
    mem_cgroup_soft_limit_reclaim()

    Then, direct reclaim is memcg softlimit hint aware, now.

    But, the memory cgroup's "limit" path can call softlimit shrinker.

    try_to_free_mem_cgroup_pages()
    do_try_to_free_pages()
    shrink_zones()
    mem_cgroup_soft_limit_reclaim()

    This will cause a global reclaim when a memcg hits limit.

    This is bug. soft_limit_reclaim() should be called when
    scanning_global_lru(sc) == true.

    And the commit adds a variable "total_scanned" for counting softlimit
    scanned pages....it's not "total". This patch removes the variable and
    update sc->nr_scanned instead of it. This will affect shrink_slab()'s
    scan condition but, global LRU is scanned by softlimit and I think this
    change makes sense.

    TODO: avoid too much scanning of a zone when softlimit did enough work.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Daisuke Nishimura
    Cc: Ying Han
    Cc: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Currently a single process may register exit handlers unlimited times.
    It may lead to a bloated listeners chain and very slow process
    terminations.

    Eg after 10KK sent TASKSTATS_CMD_ATTR_REGISTER_CPUMASKs ~300 Mb of
    kernel memory is stolen for the handlers chain and "time id" shows 2-7
    seconds instead of normal 0.003. It makes it possible to exhaust all
    kernel memory and to eat much of CPU time by triggerring numerous exits
    on a single CPU.

    The patch limits the number of times a single process may register
    itself on a single CPU to one.

    One little issue is kept unfixed - as taskstats_exit() is called before
    exit_files() in do_exit(), the orphaned listener entry (if it was not
    explicitly deregistered) is kept until the next someone's exit() and
    implicit deregistration in send_cpu_listeners(). So, if a process
    registered itself as a listener exits and the next spawned process gets
    the same pid, it would inherit taskstats attributes.

    Signed-off-by: Vasiliy Kulikov
    Cc: Balbir Singh
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     
  • Under heavy memory and filesystem load, users observe the assertion
    mapping->nrpages == 0 in end_writeback() trigger. This can be caused by
    page reclaim reclaiming the last page from a mapping in the following
    race:

    CPU0 CPU1
    ...
    shrink_page_list()
    __remove_mapping()
    __delete_from_page_cache()
    radix_tree_delete()
    evict_inode()
    truncate_inode_pages()
    truncate_inode_pages_range()
    pagevec_lookup() - finds nothing
    end_writeback()
    mapping->nrpages != 0 -> BUG
    page->mapping = NULL
    mapping->nrpages--

    Fix the problem by doing a reliable check of mapping->nrpages under
    mapping->tree_lock in end_writeback().

    Analyzed by Jay , lost in LKML, and dug out
    by Miklos Szeredi .

    Cc: Jay
    Cc: Miklos Szeredi
    Signed-off-by: Jan Kara
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • We cannot take a mutex while holding a spinlock, so flip the order and
    fix the locking documentation.

    Signed-off-by: Peter Zijlstra
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • We observed the crash point count going negative in cases where the
    crash point is hit multiple times before the check of "count == 0" is
    done. Because of this we never call lkdtm_do_action(). This patch just
    adds a spinlock to protect count.

    Reported-by: Tapan Dhimant
    Signed-off-by: Josh Hunt
    Acked-by: Ankita Garg
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Hunt
     
  • This is required for tilegx to be able to use the compat unistd.h header
    where compat_sys_sendmmsg() is now mentioned.

    Signed-off-by: Chris Metcalf
    Cc: Arnd Bergmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Metcalf
     
  • romfs_get_unmapped_area() checks argument `len' without considering
    PAGE_ALIGN which will cause do_mmap_pgoff() return -EINVAL error after
    commit f67d9b1576c ("nommu: add page_align to mmap").

    Fix the check by changing it in same way ramfs_nommu_get_unmapped_area()
    was changed in ramfs/file-nommu.c.

    Signed-off-by: Bob Liu
    Cc: David Howells
    Cc: Paul Mundt
    Acked-by: Greg Ungerer
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bob Liu
     
  • To make SLUB work on UML we need this_cpu_cmpxchg from
    asm-generic/percpu.h.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Weinberger
     
  • PT7C4338 chip is being manufactured by Pericom Technology Inc. It is a
    serial real-time clock which provides:

    1) Low-power clock/calendar.
    2) Programmable square-wave output.

    It has 56 bytes of nonvolatile RAM. Its register set is same as that of
    rtc device: DS1307.

    Signed-off-by: Priyanka Jain
    Acked-by: Timur Tabi
    Reviewed-by: Wolfram Sang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Priyanka Jain
     
  • Although it is used (by i915) on nothing but tmpfs, read_cache_page_gfp()
    is unsuited to tmpfs, because it inserts a page into pagecache before
    calling the filesystem's ->readpage: tmpfs may have pages in swapcache
    which only it knows how to locate and switch to filecache.

    At present tmpfs provides a ->readpage method, and copes with this by
    copying pages; but soon we can simplify it by removing its ->readpage.
    Provide shmem_read_mapping_page_gfp() now, ready for that transition,

    Export shmem_read_mapping_page_gfp() and add it to list in shmem_fs.h,
    with shmem_read_mapping_page() inline for the common mapping_gfp case.

    (shmem_read_mapping_page_gfp or shmem_read_cache_page_gfp? Generally the
    read_mapping_page functions use the mapping's ->readpage, and the
    read_cache_page functions use the supplied filler, so I think
    read_cache_page_gfp was slightly misnamed.)

    Signed-off-by: Hugh Dickins
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • 2.6.35's new truncate convention gave tmpfs the opportunity to control
    its file truncation, no longer enforced from outside by vmtruncate().
    We shall want to build upon that, to handle pagecache and swap together.

    Slightly redefine the ->truncate_range interface: let it now be called
    between the unmap_mapping_range()s, with the filesystem responsible for
    doing the truncate_inode_pages_range() from it - just as the filesystem
    is nowadays responsible for doing that from its ->setattr.

    Let's rename shmem_notify_change() to shmem_setattr(). Instead of
    calling the generic truncate_setsize(), bring that code in so we can
    call shmem_truncate_range() - which will later be updated to perform its
    own variant of truncate_inode_pages_range().

    Remove the punch_hole unmap_mapping_range() from shmem_truncate_range():
    now that the COW's unmap_mapping_range() comes after ->truncate_range,
    there is no need to call it a third time.

    Export shmem_truncate_range() and add it to the list in shmem_fs.h, so
    that i915_gem_object_truncate() can call it explicitly in future; get
    this patch in first, then update drm/i915 once this is available (until
    then, i915 will just be doing the truncate_inode_pages() twice).

    Though introduced five years ago, no other filesystem is implementing
    ->truncate_range, and its only other user is madvise(,,MADV_REMOVE): we
    expect to convert it to fallocate(,FALLOC_FL_PUNCH_HOLE,,) shortly,
    whereupon ->truncate_range can be removed from inode_operations -
    shmem_truncate_range() will help i915 across that transition too.

    Signed-off-by: Hugh Dickins
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Before adding any more global entry points into shmem.c, gather such
    prototypes into shmem_fs.h. Remove mm's own declarations from swap.h,
    but for now leave the ones in mm.h: because shmem_file_setup() and
    shmem_zero_setup() are called from various places, and we should not
    force other subsystems to update immediately.

    Signed-off-by: Hugh Dickins
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • You would expect to find vmtruncate_range() next to vmtruncate() in
    mm/truncate.c: move it there.

    Signed-off-by: Hugh Dickins
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Fix 'make htmldocs' warnings:

    Warning(/include/linux/hrtimer.h:153): No description found for parameter 'clockid'
    Warning(/include/linux/device.h:604): Excess struct/union/enum/typedef member 'of_match' description in 'device'
    Warning(/include/net/sock.h:349): Excess struct/union/enum/typedef member 'sk_rmem_alloc' description in 'sock'

    Signed-off-by: Vitaliy Ivanov
    Acked-by: Grant Likely
    Acked-by: David S. Miller
    Signed-off-by: Linus Torvalds

    Vitaliy Ivanov
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
    mmc: queue: bring discard_granularity/alignment into line with SCSI
    mmc: queue: append partition subname to queue thread name
    mmc: core: make erase timeout calculation allow for gated clock
    mmc: block: switch card to User Data Area when removing the block driver
    mmc: sdio: reset card during power_restore
    mmc: cb710: fix #ifdef HAVE_EFFICIENT_UNALIGNED_ACCESS
    mmc: sdhi: DMA slave ID 0 is invalid
    mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling
    mmc: omap_hsmmc: use original sg_len for dma_unmap_sg
    mmc: omap_hsmmc: fix ocr mask usage
    mmc: sdio: fix runtime PM path during driver removal
    mmc: Add PCI fixup quirks for Ricoh 1180:e823 reader
    mmc: sdhi: fix module unloading
    mmc: of_mmc_spi: add NO_IRQ define to of_mmc_spi.c
    mmc: vub300: fix null dereferences in error handling

    Linus Torvalds
     
  • commit 21a3c96 uses node_start/end_pfn(nid) for detection start/end
    of nodes. But, it's not defined in linux/mmzone.h but defined in
    /arch/???/include/mmzone.h which is included only under
    CONFIG_NEED_MULTIPLE_NODES=y.

    Then, we see
    mm/page_cgroup.c: In function 'page_cgroup_init':
    mm/page_cgroup.c:308: error: implicit declaration of function 'node_start_pfn'
    mm/page_cgroup.c:309: error: implicit declaration of function 'node_end_pfn'

    So, fixiing page_cgroup.c is an idea...

    But node_start_pfn()/node_end_pfn() is a very generic macro and
    should be implemented in the same manner for all archs.
    (m32r has different implementation...)

    This patch removes definitions of node_start/end_pfn() in each archs
    and defines a unified one in linux/mmzone.h. It's not under
    CONFIG_NEED_MULTIPLE_NODES, now.

    A result of macro expansion is here (mm/page_cgroup.c)

    for !NUMA
    start_pfn = ((&contig_page_data)->node_start_pfn);
    end_pfn = ({ pg_data_t *__pgdat = (&contig_page_data); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

    for NUMA (x86-64)
    start_pfn = ((node_data[nid])->node_start_pfn);
    end_pfn = ({ pg_data_t *__pgdat = (node_data[nid]); __pgdat->node_start_pfn + __pgdat->node_spanned_pages;});

    Changelog:
    - fixed to avoid using "nid" twice in node_end_pfn() macro.

    Reported-and-acked-by: Randy Dunlap
    Reported-and-tested-by: Ingo Molnar
    Acked-by: Mel Gorman
    Signed-off-by: KAMEZAWA Hiroyuki
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    btrfs: fix inconsonant inode information
    Btrfs: make sure to update total_bitmaps when freeing cache V3
    Btrfs: fix type mismatch in find_free_extent()
    Btrfs: make sure to record the transid in new inodes

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    xfs: prevent bogus assert when trying to remove non-existent attribute
    xfs: clear XFS_IDIRTY_RELEASE on truncate down
    xfs: reset inode per-lifetime state when recycling it

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
    HID: hid-multitouch: add support for a new Lumio dual-touch panel
    HID: hid-multitouch: correct VID for Stantum panels
    HID: hid-multitouch: ensure slots are initialized

    Linus Torvalds
     

27 Jun, 2011

5 commits

  • * 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
    ARM: pm: ensure ARMv7 CPUs save and restore the TLS register
    ARM: pm: proc-v7: fix missing struct processor pointers for suspend code
    ARM: 6969/1: plat-iop: fix build error
    ARM: 6961/1: zImage: Add build-time check for correctly-sized proc_type entries
    ARM: SMP: wait for CPU to be marked active
    ARM: 6963/1: Thumb-2: Relax relocation requirements for non-function symbols
    ARM: 6962/1: mach-h720x: fix build error
    ARM: 6959/1: SMP build fix for entry-macro-multi.S

    Linus Torvalds
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] allow setting of upper 32 bit in smp_ctl_set_bit
    [S390] hwsampler: Set a sane default sampling rate
    [S390] s390: enforce HW limits for the initial sampling rate
    [S390] kvm-s390: fix kconfig dependencies

    Linus Torvalds
     
  • When iputting the inode, We may leave the delayed nodes if they have some
    delayed items that have not been dealt with. So when the inode is read again,
    we must look up the relative delayed node, and use the information in it to
    initialize the inode. Or we will get inconsonant inode information, it may
    cause that the same directory index number is allocated again, and hit the
    following oops:

    [ 5447.554187] err add delayed dir index item(name: pglog_0.965_0) into the
    insertion tree of the delayed node(root id: 262, inode id: 258, errno: -17)
    [ 5447.569766] ------------[ cut here ]------------
    [ 5447.575361] kernel BUG at fs/btrfs/delayed-inode.c:1301!
    [SNIP]
    [ 5447.790721] Call Trace:
    [ 5447.793191] [] btrfs_insert_dir_item+0x189/0x1bb [btrfs]
    [ 5447.800156] [] btrfs_add_link+0x12b/0x191 [btrfs]
    [ 5447.806517] [] btrfs_add_nondir+0x31/0x58 [btrfs]
    [ 5447.812876] [] btrfs_create+0xf9/0x197 [btrfs]
    [ 5447.818961] [] vfs_create+0x72/0x92
    [ 5447.824090] [] do_last+0x22c/0x40b
    [ 5447.829133] [] path_openat+0xc0/0x2ef
    [ 5447.834438] [] ? __perf_event_task_sched_out+0x24/0x44
    [ 5447.841216] [] ? perf_event_task_sched_out+0x59/0x67
    [ 5447.847846] [] do_filp_open+0x3d/0x87
    [ 5447.853156] [] ? strncpy_from_user+0x43/0x4d
    [ 5447.859072] [] ? getname_flags+0x2e/0x80
    [ 5447.864636] [] ? do_getname+0x14b/0x173
    [ 5447.870112] [] ? audit_getname+0x16/0x26
    [ 5447.875682] [] ? spin_lock+0xe/0x10
    [ 5447.880882] [] do_sys_open+0x69/0xae
    [ 5447.886153] [] sys_open+0x20/0x22
    [ 5447.891114] [] system_call_fastpath+0x16/0x1b

    Fix it by reusing the old delayed node.

    Reported-by: Jim Schutt
    Signed-off-by: Miao Xie
    Tested-by: Jim Schutt
    Signed-off-by: Chris Mason

    Miao Xie
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: mark CONFIG_CIFS_NFSD_EXPORT as BROKEN
    cifs: free blkcipher in smbhash

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    cifs: propagate errors from cifs_get_root() to mount(2)
    cifs: tidy cifs_do_mount() up a bit
    cifs: more breakage on mount failures
    cifs: close sget() races
    cifs: pull freeing mountdata/dropping nls/freeing cifs_sb into cifs_umount()
    cifs: move cifs_umount() call into ->kill_sb()
    cifs: pull cifs_mount() call up
    sanitize cifs_umount() prototype
    cifs: initialize ->tlink_tree in cifs_setup_cifs_sb()
    cifs: allocate mountdata earlier
    cifs: leak on mount if we share superblock
    cifs: don't pass superblock to cifs_mount()
    cifs: don't leak nls on mount failure
    cifs: double free on mount failure
    take bdi setup/destruction into cifs_mount/cifs_umount

    Acked-by: Steve French

    Linus Torvalds
     

26 Jun, 2011

12 commits

  • SCSI defines discard alignment as the offset to the first
    optimal discard. In the case of SD/MMC, that is always zero
    which is the default.

    SCSI defines discard granularity as a hint of a optimal
    discard size. That is much better expressed by the MMC
    "preferred erase size" (pref_erase) field.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • For example, an eMMC with 2 boot partitions will have 3 threads.
    The names change from:

    40 ? 00:00:00 mmcqd/0
    41 ? 00:00:00 mmcqd/0
    42 ? 00:00:00 mmcqd/0

    to:

    40 ? 00:00:00 mmcqd/0
    41 ? 00:00:00 mmcqd/0boot0
    42 ? 00:00:00 mmcqd/0boot1

    Signed-off-by: Adrian Hunter
    Cc: Andrei Warkentin
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • The erase timeout calculation may depend on clock rate
    which is zero if the clock is gated, so use
    mmc_host_clk_rate() which allows for that case.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • The MMC block driver and other drivers (e.g. mmc-test) will expect
    the card to be switched to the User Data Area eMMC partition when
    they start. Hence the MMC block driver should ensure it is that
    way when it is removed.

    Signed-off-by: Adrian Hunter
    Cc: Andrei Warkentin
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • mmc_sdio_power_restore() skips some steps that are performed in other
    power-related codepaths which are necessary to fully reset the card.
    Without this, runtime PM fails for SD8686 SDIO wifi on OLPC XO-1.5.

    Signed-off-by: Daniel Drake
    Signed-off-by: Chris Ball

    Daniel Drake
     
  • HAVE_EFFICIENT_UNALIGNED_ACCESS is a config option, therefore it needs
    the CONFIG_ before it when used by the preprocessor.

    Signed-off-by: James Hogan
    Acked-by: Michał Mirosław
    Signed-off-by: Chris Ball

    James Hogan
     
  • Don't try to allocate DMA resources if the platform didn't specify
    positive DMA slave IDs.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • Commit b6147490e6aac82 ("mmc: tmio: split core functionality, DMA and
    MFD glue") broke handling of the TMIO_MMC_WRPROTECT_DISABLE flag by
    the tmio-mmc driver. This patch restores the original behaviour.

    Signed-off-by: Guennadi Liakhovetski
    Cc:
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • Don't use the returned sg_len from dma_map_sg() as inparameter
    to dma_unmap_sg(). Use the original sg_len for both dma_map_sg
    and dma_unmap_sg according to the documentation in DMA-API.txt.

    Signed-off-by: Per Forlin
    Reviewed-by: Venkatraman S
    Signed-off-by: Chris Ball

    Per Forlin
     
  • The OMAP HSMMC driver uses an ocr_mask to determine the list of voltages
    supported by the card. It populates this mask based on the list of
    voltages supported by the regulator that supplies the voltage.

    Commit 64be97822b (omap4 hsmmc: Update ocr mask for MMC2 for regulator
    to use) passed a fixed ocr_mask from the OMAP4 SDP board file to limit
    the voltage to 2.9-3.0 Volts, and updated the driver to use this mask
    if provided, instead of using the regulator's supported voltages.

    However the commit is buggy - the ocr_mask is overridden by the
    regulator's capabilities anyway. Fix this.

    (The bug shows up when a system-wide suspend is attempted on the OMAP4
    SDP/Blaze platforms. The eMMC card comes up at 3V, but drops to 1.65V
    after the system resumes).

    Signed-off-by: Anand Gadiyar
    Acked-by: Balaji T K
    Acked-by: Venkatraman S
    Tested-by: Kishore Kadiyala
    Signed-off-by: Sourav Poddar
    Signed-off-by: Chris Ball

    Anand Gadiyar
     
  • After commit e1866b3 "PM / Runtime: Rework runtime PM handling
    during driver removal" was introduced, the driver core stopped
    incrementing the runtime PM usage counter of the device during
    the invocation of the ->remove() callback.

    This indirectly broke SDIO's runtime PM path during driver removal,
    because no one calls _put_sync() anymore after ->remove() completes.

    This means that the power of runtime-PM-managed SDIO cards is kept
    high after their driver is removed (even if it was powered down
    beforehand).

    Fix that by directly calling _put_sync() when the last usage
    counter is downref'ed by the SDIO bus.

    Reported-and-tested-by: Daniel Drake
    Signed-off-by: Ohad Ben-Cohen
    Signed-off-by: Chris Ball

    Ohad Ben-Cohen
     
  • Steve French
     

25 Jun, 2011

1 commit