1. 23 Oct, 2012 10 commits
    • anish kumar's avatar
      extcon: trivial: kfree missed from remove path · 44b7bccf
      anish kumar authored
      Extcon core doesn't free the memory when we do unregister.
      Kfree is added in the remove path as it was missing.
      Signed-off-by: default avataranish kumar <anish198519851985@gmail.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      44b7bccf
    • anish kumar's avatar
      extcon: driver model release call not needed · 57e7cd37
      anish kumar authored
      There was a case where free and list_del can be called twice
      on the same pointer.So fixed it by re-arranging the code and
      removing a function which was not needed.
      Signed-off-by: default avataranish kumar <anish198519851985@gmail.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
      57e7cd37
    • Chanwoo Choi's avatar
      extcon: MAX77693: Add platform data for MUIC device to initialize registers · f8457d57
      Chanwoo Choi authored
      This patch add platform data for MUIC device to initialize register
      on probe() call because it should unmask interrupt mask register
      and initialize some register related to MUIC device.
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: default avatarMyungjoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      f8457d57
    • Axel Lin's avatar
      extcon: max77693: Use max77693_update_reg for rmw operations · bf2627d6
      Axel Lin authored
      This simplifies the code.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      bf2627d6
    • Axel Lin's avatar
    • Axel Lin's avatar
      extcon: adc-jack: Add missing MODULE_LICENSE · d9310e35
      Axel Lin authored
      This driver can be built as a module, add MODULE_LICENSE for it.
      For completeness, also adds MODULE_AUTHOR and MODULE_DESCRIPTION.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      d9310e35
    • Axel Lin's avatar
      extcon: adc-jack: Fix checking return value of request_any_context_irq · 03019759
      Axel Lin authored
      On failure, request_any_context_irq() returns a negative value.
      On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
      
      Also ensure adc_jack_probe() return 0 on success.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      03019759
    • Sachin Kamat's avatar
      extcon: Fix return value in extcon_register_interest() · 5cd3c277
      Sachin Kamat authored
      Propagate the value returned from extcon_find_cable_index()
      instead of -ENODEV. For readability, -EINVAL is returned in place of
      the variable.
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      5cd3c277
    • Peter Huewe's avatar
      extcon: unregister compat link on cleanup · 824a1bc0
      Peter Huewe authored
      Since extcon registers this compat link at device registration
      (extcon_dev_register), we should probably remove them at deregistration/cleanup.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      824a1bc0
    • Peter Huewe's avatar
      extcon: Unregister compat class at module unload to fix oops · 0dc77b6d
      Peter Huewe authored
      If you compile extcon with CONFIG_ANDROID and then load and unload the
      module you get a simple oops as the driver does not unregister its
      compat class and thus cannot register it again.
      
      Full trace:
      
      root@(none):~# modprobe extcon_class
      root@(none):~# rmmod extcon_class
      root@(none):~# modprobe extcon_class
      ------------[ cut here ]------------
      WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0xde/0x100()
      sysfs: cannot create duplicate filename '/class/switch'
      Modules linked in: extcon_class(+) [last unloaded: extcon_class]
      Call Trace:
      9f451a00:  [<602a58bc>] printk+0x0/0xa8
      9f451a18:  [<60039b43>] warn_slowpath_common+0x93/0xd0
      9f451a28:  [<6012c6de>] sysfs_add_one+0xde/0x100
      9f451a50:  [<601d3d90>] strcat+0x0/0x40
      9f451a68:  [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0
      9f451a90:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451ab0:  [<60039c40>] warn_slowpath_fmt+0x0/0xa0
      9f451ac0:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451ae8:  [<6012bd97>] sysfs_pathname.isra.10+0x57/0x70
      9f451b00:  [<601d3d90>] strcat+0x0/0x40
      9f451b18:  [<6012bd97>] sysfs_pathname.isra.10+0x57/0x70
      9f451b48:  [<6012c6de>] sysfs_add_one+0xde/0x100
      9f451b78:  [<6012c96f>] create_dir+0x8f/0x100
      9f451bc0:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451bd8:  [<6012cda6>] sysfs_create_dir+0xa6/0x1c0
      9f451be8:  [<601d89f1>] kvasprintf+0x81/0xa0
      9f451bf8:  [<601cf0f0>] kobject_get+0x0/0x50
      9f451c18:  [<601cf396>] kobject_add_internal+0x96/0x280
      9f451c60:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451c78:  [<601cfb93>] kobject_add+0xd3/0x140
      9f451cc0:  [<601cfac0>] kobject_add+0x0/0x140
      9f451cd0:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451cf8:  [<6002fffc>] set_signals+0x29/0x3f
      9f451d28:  [<600c1de1>] kmem_cache_alloc+0xe1/0x100
      9f451d78:  [<601cffa0>] kobject_create_and_add+0x50/0xa0
      9f451da8:  [<601fbe76>] class_compat_register+0x56/0x80
      9f451dc8:  [<a085d118>] create_extcon_class+0x88/0xd0 [extcon_class]
      9f451de8:  [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class]
      9f451df8:  [<600189a8>] do_one_initcall+0x48/0x1f0
      9f451e20:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e30:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e58:  [<6007e3c3>] sys_init_module+0xa3/0x280
      9f451e88:  [<6001e2ad>] handle_syscall+0x8d/0x90
      9f451ea8:  [<60033370>] userspace+0x405/0x531
      9f451ee8:  [<6001e380>] copy_chunk_to_user+0x0/0x40
      9f451ef8:  [<6001e5cd>] do_op_one_page+0x14d/0x220
      9f451fd8:  [<6001a355>] fork_handler+0x95/0xa0
      
      ---[ end trace dd512cc03fe1c367 ]---
      ------------[ cut here ]------------
      WARNING: at lib/kobject.c:196 kobject_add_internal+0x26e/0x280()
      kobject_add_internal failed for switch with -EEXIST, don't try to
      register things with the same name in the same directory.
      Modules linked in: extcon_class(+) [last unloaded: extcon_class]
      Call Trace:
      9f451ad0:  [<602a58bc>] printk+0x0/0xa8
      9f451ae8:  [<60039b43>] warn_slowpath_common+0x93/0xd0
      9f451af8:  [<601cf56e>] kobject_add_internal+0x26e/0x280
      9f451b18:  [<601cf140>] kobject_put+0x0/0x70
      9f451b20:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451b38:  [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0
      9f451b88:  [<60039c40>] warn_slowpath_fmt+0x0/0xa0
      9f451bc0:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451bd8:  [<6012cda6>] sysfs_create_dir+0xa6/0x1c0
      9f451be8:  [<601d89f1>] kvasprintf+0x81/0xa0
      9f451bf8:  [<601cf0f0>] kobject_get+0x0/0x50
      9f451c18:  [<601cf56e>] kobject_add_internal+0x26e/0x280
      9f451c60:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451c78:  [<601cfb93>] kobject_add+0xd3/0x140
      9f451cc0:  [<601cfac0>] kobject_add+0x0/0x140
      9f451cd0:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451cf8:  [<6002fffc>] set_signals+0x29/0x3f
      9f451d28:  [<600c1de1>] kmem_cache_alloc+0xe1/0x100
      9f451d78:  [<601cffa0>] kobject_create_and_add+0x50/0xa0
      9f451da8:  [<601fbe76>] class_compat_register+0x56/0x80
      9f451dc8:  [<a085d118>] create_extcon_class+0x88/0xd0 [extcon_class]
      9f451de8:  [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class]
      9f451df8:  [<600189a8>] do_one_initcall+0x48/0x1f0
      9f451e20:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e30:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e58:  [<6007e3c3>] sys_init_module+0xa3/0x280
      9f451e88:  [<6001e2ad>] handle_syscall+0x8d/0x90
      9f451ea8:  [<60033370>] userspace+0x405/0x531
      9f451ee8:  [<6001e380>] copy_chunk_to_user+0x0/0x40
      9f451ef8:  [<6001e5cd>] do_op_one_page+0x14d/0x220
      9f451fd8:  [<6001a355>] fork_handler+0x95/0xa0
      
      ---[ end trace dd512cc03fe1c368 ]---
      kobject_create_and_add: kobject_add error: -17
      ------------[ cut here ]------------
      WARNING: at drivers/extcon/extcon_class.c:545
      create_extcon_class+0xbc/0xd0 [extcon_class]()
      cannot allocate
      Modules linked in: extcon_class(+) [last unloaded: extcon_class]
      Call Trace:
      9f451c80:  [<602a58bc>] printk+0x0/0xa8
      9f451c98:  [<60039b43>] warn_slowpath_common+0x93/0xd0
      9f451ca0:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451ca8:  [<a085d14c>] create_extcon_class+0xbc/0xd0 [extcon_class]
      9f451cd0:  [<a0861000>] extcon_class_init+0x0/0x12 [extcon_class]
      9f451ce8:  [<60039cdc>] warn_slowpath_fmt+0x9c/0xa0
      9f451d20:  [<6002fe32>] unblock_signals+0x0/0x84
      9f451d28:  [<60039c40>] warn_slowpath_fmt+0x0/0xa0
      9f451d48:  [<6002fffc>] set_signals+0x29/0x3f
      9f451d58:  [<601cf172>] kobject_put+0x32/0x70
      9f451d78:  [<600c22c3>] kfree+0xb3/0x100
      9f451da8:  [<601fbe9a>] class_compat_register+0x7a/0x80
      9f451dc8:  [<a085d14c>] create_extcon_class+0xbc/0xd0 [extcon_class]
      9f451de8:  [<a0861010>] extcon_class_init+0x10/0x12 [extcon_class]
      9f451df8:  [<600189a8>] do_one_initcall+0x48/0x1f0
      9f451e20:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e30:  [<60061920>] blocking_notifier_call_chain+0x0/0x20
      9f451e58:  [<6007e3c3>] sys_init_module+0xa3/0x280
      9f451e88:  [<6001e2ad>] handle_syscall+0x8d/0x90
      9f451ea8:  [<60033370>] userspace+0x405/0x531
      9f451ee8:  [<6001e380>] copy_chunk_to_user+0x0/0x40
      9f451ef8:  [<6001e5cd>] do_op_one_page+0x14d/0x220
      9f451fd8:  [<6001a355>] fork_handler+0x95/0xa0
      
      ---[ end trace dd512cc03fe1c369 ]---
      FATAL: Error inserting extcon_class
      (/lib/modules/3.6.0-rc6-00178-g811315f/kernel/drivers/extcon/extcon_class.ko):
      Cannot allocate memory
      
      This patch fixes this.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      0dc77b6d
  2. 22 Oct, 2012 4 commits
  3. 20 Oct, 2012 9 commits
    • Linus Torvalds's avatar
      Linux 3.7-rc2 · 6f0c0580
      Linus Torvalds authored
      6f0c0580
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 198190a1
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Main changes:
         - AArch64 Linux compilation fixes following 3.7-rc1 changes
           (MODULES_USE_ELF_RELA, update_vsyscall() prototype)
         - Unnecessary register setting in start_thread() (thanks to Al Viro)
         - ptrace fixes"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: fix alignment padding in assembly code
        arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
        arm64: ptrace: make structure padding explicit for debug registers
        arm64: No need to set the x0-x2 registers in start_thread()
        arm64: Ignore memory blocks below PHYS_OFFSET
        arm64: Fix the update_vsyscall() prototype
        arm64: Select MODULES_USE_ELF_RELA
        arm64: Remove duplicate inclusion of mmu_context.h in smp.c
      198190a1
    • Marc Zyngier's avatar
      arm64: fix alignment padding in assembly code · aeed41a9
      Marc Zyngier authored
      An interesting effect of using the generic version of linkage.h
      is that the padding is defined in terms of x86 NOPs, which can have
      even more interesting effects when the assembly code looks like this:
      
      ENTRY(func1)
      	mov	x0, xzr
      ENDPROC(func1)
      	// fall through
      ENTRY(func2)
      	mov	x0, #1
      	ret
      ENDPROC(func2)
      
      Admittedly, the code is not very nice. But having code from another
      architecture doesn't look completely sane either.
      
      The fix is to add arm64's version of linkage.h, which causes the insertion
      of proper AArch64 NOPs.
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      aeed41a9
    • Kees Cook's avatar
      use clamp_t in UNAME26 fix · 31fd84b9
      Kees Cook authored
      The min/max call needed to have explicit types on some architectures
      (e.g. mn10300). Use clamp_t instead to avoid the warning:
      
        kernel/sys.c: In function 'override_release':
        kernel/sys.c:1287:10: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      31fd84b9
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8c1bee68
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Assorted small fixes"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf python: Properly link with libtraceevent
        perf hists browser: Add back callchain folding symbol
        perf tools: Fix build on sparc.
        perf python: Link with libtraceevent
        perf python: Initialize 'page_size' variable
        tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter
        lib tools traceevent: Add back pevent assignment in __pevent_parse_format()
        perf hists browser: Fix off-by-two bug on the first column
        perf tools: Remove warnings on JIT samples for srcline sort key
        perf tools: Fix segfault when using srcline sort key
        perf: Require exclude_guest to use PEBS - kernel side enforcement
        perf tool: Precise mode requires exclude_guest
      8c1bee68
    • Arnaldo Carvalho de Melo's avatar
      perf python: Properly link with libtraceevent · 45bff41a
      Arnaldo Carvalho de Melo authored
      Namhyung Kim reported that the build fails with:
      
        GEN python/perf.so
        gcc: error: python_ext_build/tmp//../../libtraceevent.a: No such file or directory
        error: command 'gcc' failed with exit status 1
        cp: cannot stat `python_ext_build/lib/perf.so': No such file or directory
        make: *** [python/perf.so] Error 1
      
      We need to propagate the TE_PATH variable to the setup.py file.
      Reported-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Link: http://lkml.kernel.org/n/tip-8umiPbm4sxpknKivbjgykhut@git.kernel.org
      [ Fixed superfluous variable build error. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      45bff41a
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · a448a031
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      * The python binding needs to link with libtraceevent and to initialize
        the 'page_size' variable so that mmaping works again.
      
      * The callchain folding character that appears on the TUI just before
        the overhead had disappeared due to recent changes, add it back.
      
      * Intel PEBS in VT-x context uses the DS address as a guest linear address,
        even though its programmed by the host as a host linear address. This either
        results in guest memory corruption and or the hardware faulting and 'crashing'
        the virtual machine.  Therefore we have to disable PEBS on VT-x enter and
        re-enable on VT-x exit, enforcing a strict exclude_guest.
      
        Kernel side enforcement fix by Peter Zijlstra, tooling side fix by David Ahern.
      
      * Fix build on sparc due to UAPI, fix from David Miller.
      
      * Fixes for the srclike sort key for unresolved symbols and when processing
        samples in JITted code, where we don't have an ELF file, just an special
        symbol table, fixes from Namhyung Kim.
      
      * Fix some leaks in libtraceevent, from Steven Rostedt.
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a448a031
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 37820108
      Linus Torvalds authored
      Pull ARM soc fixes from Olof Johansson:
       "A set of fixes and some minor cleanups for -rc2:
      
         - A series from Arnd that fixes warnings in drivers and other code
           included by ARM defconfigs.  Most have been acked by corresponding
           maintainers (and seem quite hard to argue not picking up anyway in
           the few exception cases).
         - A few misc patches from the list for integrator/vt8500/i.MX
         - A batch of fixes to OMAP platforms, fixing:
           - boot problems on beaglebone,
           - regression fixes for local timers
           - clockdomain locking fixes
           - a few boot/sparse warnings
         - For Tegra:
           - Clock rate calculation overflow fix
           - Revert a change that removed timer clocks and a fix for symbol
             name clashes
         - For Renesas:
           - IO accessor / annotation cleanups to remove warnings
         - For Kirkwood/Dove/mvebu:
           - Fixes for device trees for Dove (some minor cleanups, some fixes)
           - Fixes for the mvebu gpio driver
           - Fix build problem for Feroceon due to missing ifdefs
           - Fix lsxl DTS files"
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        ARM: kirkwood: fix buttons on lsxl boards
        ARM: kirkwood: fix LEDs names for lsxl boards
        ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
        gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
        ARM: dove: Add crypto engine to DT
        ARM: dove: Remove watchdog from DT
        ARM: dove: Restructure SoC device tree descriptor
        ARM: dove: Fix clock names of sata and gbe
        ARM: dove: Fix tauros2 device tree init
        ARM: dove: Add pcie clock support
        ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
        ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
        ARM: s3c: mark s3c2440_clk_add as __init_refok
        spi/s3c64xx: use correct dma_transfer_direction type
        ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
        ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
        ARM: OMAP: resolve sparse warning concerning debug_card_init()
        ARM: OMAP4: Fix twd_local_timer_register regression
        ARM: tegra: add tegra_timer clock
        ARM: tegra: rename tegra system timer
        ...
      37820108
    • David Howells's avatar
      MODSIGN: Move the magic string to the end of a module and eliminate the search · caabe240
      David Howells authored
      Emit the magic string that indicates a module has a signature after the
      signature data instead of before it.  This allows module_sig_check() to
      be made simpler and faster by the elimination of the search for the
      magic string.  Instead we just need to do a single memcmp().
      
      This works because at the end of the signature data there is the
      fixed-length signature information block.  This block then falls
      immediately prior to the magic number.
      
      From the contents of the information block, it is trivial to calculate
      the size of the signature data and thus the size of the actual module
      data.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      caabe240
  4. 19 Oct, 2012 17 commits