01 Aug, 2012

1 commit

  • Fix zillions of these:

    drivers/media/video/v4l2-ioctl.c:1848: error: unknown field 'func' specified in initializer
    drivers/media/video/v4l2-ioctl.c:1848: warning: missing braces around initializer
    drivers/media/video/v4l2-ioctl.c:1848: warning: (near initialization for 'v4l2_ioctls[0].')
    drivers/media/video/v4l2-ioctl.c:1848: warning: initialization makes integer from pointer without a cast
    drivers/media/video/v4l2-ioctl.c:1848: error: initializer element is not computable at load time
    drivers/media/video/v4l2-ioctl.c:1848: error: (near initialization for 'v4l2_ioctls[0]..offset')

    Cc: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

31 Jul, 2012

39 commits

  • Pull MFD fix from Samuel Ortiz:
    "This one fixes an s5m8767 regulator build breakage due to a merge
    conflict caused by the MFD s5m API changes."

    * tag 'mfd-for-linus-3.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
    regulator: Fix an s5m8767 build failure

    Linus Torvalds
     
  • Pull media updates from Mauro Carvalho Chehab:
    "This is the first part of the media patches for v3.6.

    This patch series contain:
    - new DVB frontend: rtl2832
    - new video drivers: adv7393
    - some unused files got removed
    - a selection API cleanup between V4L2 and V4L2 subdev API's
    - a major redesign at v4l-ioctl2, in order to clean it up
    - several driver fixes and improvements."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (174 commits)
    v4l: Export v4l2-common.h in include/linux/Kbuild
    media: Revert "[media] Terratec Cinergy S2 USB HD Rev.2"
    [media] media: Use pr_info not homegrown pr_reg macro
    [media] Terratec Cinergy S2 USB HD Rev.2
    [media] v4l: Correct conflicting V4L2 subdev selection API documentation
    [media] Feature removal: V4L2 selections API target and flag definitions
    [media] v4l: Unify selection flags documentation
    [media] v4l: Unify selection flags
    [media] v4l: Common documentation for selection targets
    [media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
    [media] v4l: Remove "_ACTUAL" from subdev selection API target definition names
    [media] V4L: Remove "_ACTIVE" from the selection target name definitions
    [media] media: dvb-usb: print mac address via native %pM
    [media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
    [media] media: gpio-ir-recv: add allowed_protos for platform data
    [media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
    [media] saa7134: fix spelling of detach in label
    [media] cx88-blackbird: replace ioctl by unlocked_ioctl
    [media] cx88: don't use current_norm
    [media] cx88: fix a number of v4l2-compliance violations
    ...

    Linus Torvalds
     
  • Merge Andrew's first set of patches:
    "Non-MM patches:

    - lots of misc bits

    - tree-wide have_clk() cleanups

    - quite a lot of printk tweaks. I draw your attention to "printk:
    convert the format for KERN_ to a 2 byte pattern" which
    looks a bit scary. But afaict it's solid.

    - backlight updates

    - lib/ feature work (notably the addition and use of memweight())

    - checkpatch updates

    - rtc updates

    - nilfs updates

    - fatfs updates (partial, still waiting for acks)

    - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc

    - new fault-injection feature work"

    * Merge emailed patches from Andrew Morton : (128 commits)
    drivers/misc/lkdtm.c: fix missing allocation failure check
    lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
    fault-injection: add tool to run command with failslab or fail_page_alloc
    fault-injection: add selftests for cpu and memory hotplug
    powerpc: pSeries reconfig notifier error injection module
    memory: memory notifier error injection module
    PM: PM notifier error injection module
    cpu: rewrite cpu-notifier-error-inject module
    fault-injection: notifier error injection
    c/r: fcntl: add F_GETOWNER_UIDS option
    resource: make sure requested range is included in the root range
    include/linux/aio.h: cpp->C conversions
    fs: cachefiles: add support for large files in filesystem caching
    pps: return PTR_ERR on error in device_create
    taskstats: check nla_reserve() return
    sysctl: suppress kmemleak messages
    ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION
    ipc: compat: use signed size_t types for msgsnd and msgrcv
    ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC
    ipc: add COMPAT_SHMLBA support
    ...

    Linus Torvalds
     
  • Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44691

    Reported-by:
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • We should return PTR_ERR if the call to the device_create function fails.
    Without this patch we instead return the value from a successful call to
    cdev_add if the call to device_create fails.

    Signed-off-by: Emil Goode
    Acked-by: Devendra Naga
    Cc: Alexander Gordeev
    Cc: Rodolfo Giometti
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Emil Goode
     
  • Set the of_match_table for this driver so that devices can be described
    in the device tree.

    Signed-off-by: Nick Bowler
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Bowler
     
  • The owner member is supposed to be set to the module implementing the
    device driver, i.e., THIS_MODULE. This enables the appropriate module
    link in sysfs.

    Signed-off-by: Nick Bowler
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Bowler
     
  • Freeing will trigger when driver unloads, so using devm_kfree() is not
    needed.

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Ashish Jangam
    Cc: David Dajun Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • Signed-off-by: Uwe Kleine-König
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • This allows automatic driver loading for all supported device types.

    Signed-off-by: Uwe Kleine-König
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Fixes the following checkpatch warnings:

    WARNING: Use #include instead of
    WARNING: Use #include instead of

    Signed-off-by: Sachin Kamat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sachin Kamat
     
  • When the driver detects that the clock time is invalid, it attempts to
    write a sane time into the hardware. We curently assume that everything
    is OK if those writes succeeded. But it is better to re-read the time
    from the hardware to ensure that the new settings got there OK.

    Cc: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Anatolij Gustschin
    Cc: Andreas Dumberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • r9701_get_datetime() calls rtc_valid_tm() and returns the value returned
    by rtc_valid_tm(), which can be used in the `if', so calling
    rtc_valid_tm() a second time is not required.

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Anatolij Gustschin
    Cc: Andreas Dumberger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • AB8500 ED (Early Drop) is no longer supported by the kernel.

    Signed-off-by: Bengt Jonsson
    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bengt Jonsson
     
  • RTC: Fix to correct improper implementation of clock update irq
    (RTC_UIE) and enable UIE Emulation.

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Ramesh Chandrasekaran
    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ramesh Chandrasekaran
     
  • The pl031 interrupt is shared between the timer part and the clockwatch
    part of the same HW block on the ux500, so mark it IRQF_SHARED on this
    variant.

    This patch also adds the IRQF_NO_SUSPEND flag to the rtc irq on all
    variants as we don't want this pretty important IRQ to be disabled in
    suspend.

    Signed-off-by: Mattias Wallin
    Signed-off-by: Linus Walleij
    Reviewed-by: Rickard Andersson
    Reviewed-by: Jonas Aberg
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mattias Wallin
     
  • Instead of hard-checking for certain vendor codes, follow the pattern of
    other AMBA (PrimeCell) drivers and use variables in the vendor data.
    Get rid of the locally cached vendor and hardware revision since we
    already have the nice vendor data variable in the state.

    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Move the per-vendor operations for this RTC into a encapsulating struct so
    we can have more per-vendor variables than just the ops.

    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Allocate memory, region, remap and irq for device state using devm_*
    helpers to simplify memory accounting.

    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Make sure we prepare/unprepare the clock for the COH901331 RTC driver as
    is required by the clk API especially if you use common clock.

    Signed-off-by: Linus Walleij
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Walleij
     
  • Fix a case where users can try to allocate arbitarily large amounts of
    memory. 64K is overkill for a config request so apply an upper bound.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • … array which is no longer valid

    ... when being used in the calling function. Although it may work, the
    behavior is undefined. Detected by cppcheck.

    Signed-off-by: Kamil Dudka <kdudka@redhat.com>
    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Kamil Dudka
     
  • There are two ways to create /sys/firmware/memmap/X sysfs:

    - firmware_map_add_early
    When the system starts, it is calledd from e820_reserve_resources()
    - firmware_map_add_hotplug
    When the memory is hot plugged, it is called from add_memory()

    But these functions are called without unifying value of end argument as
    below:

    - end argument of firmware_map_add_early() : start + size - 1
    - end argument of firmware_map_add_hogplug() : start + size

    The patch unifies them to "start + size". Even if applying the patch,
    /sys/firmware/memmap/X/end file content does not change.

    [akpm@linux-foundation.org: clarify comments]
    Signed-off-by: Yasuaki Ishimatsu
    Reviewed-by: Dave Hansen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasuaki Ishimatsu
     
  • Use memweight() to count the total number of bits set in memory area.

    Signed-off-by: Akinobu Mita
    Acked-by: Laurent Pinchart
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Use memweight() to count the total number of bits set in memory area.

    Signed-off-by: Akinobu Mita
    Cc: Alasdair Kergon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • The lp855x header is used only in the platform side, so it can be moved
    into platform_data directory

    Signed-off-by: Milo(Woogyom) Kim
    Cc: Richard Purdie
    Cc: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kim, Milo
     
  • ROM boundary definitions do not need to be exported because these are
    used only internally in the lp855x driver.

    And few code cosmetic changes

    Signed-off-by: Milo(Woogyom) Kim
    Cc: Richard Purdie
    Cc: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kim, Milo
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request_one() for these functions.

    Signed-off-by: Jingoo Han
    Cc: Alberto Panizzo
    Cc: Richard Purdie
    Cc: Grant Likely
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Cc: Eric Miao
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Acked-by: Marek Vasut
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Cc: Dmitry Baryshkov
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Cc: Dmitry Baryshkov
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Acked-by: Christian Gmeiner
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_gpio_request() for these functions.

    Signed-off-by: Jingoo Han
    Cc: Hans-Christian Egtvedt
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc of these functions.

    Signed-off-by: Jingoo Han
    Acked-by: Johan Hovold
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc of these functions

    Signed-off-by: Jingoo Han
    Cc: Christian Gmeiner
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The devm_ functions allocate memory that is released when a driver
    detaches. This patch uses devm_kzalloc of these functions.

    Signed-off-by: Jingoo Han
    Acked-by: Hans-Christian Egtvedt
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Addresses https://bugzilla.kernel.org/show_bug.cgi?44431

    Reported-by:
    Signed-off-by: Alan Cox
    Cc: Pavan Savoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • clk_get() returns -ENOENT on error and some careless caller might
    dereference it without error checking:

    In mxc_rnga_remove():

    struct clk *clk = clk_get(&pdev->dev, "rng");

    // ...

    clk_disable(clk);

    Since it's insane to audit the lots of existing and future clk users,
    let's add a check in the callee to avoid kernel panic and warn about
    any buggy user.

    Cc: Russell King
    Cc: Paul Gortmaker
    Cc: Viresh Kumar
    Cc: viresh kumar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fengguang Wu