18 Dec, 2012

40 commits

  • As Bruce Fields pointed out, kstrto* is currently lacking kerneldoc
    comments. This patch adds kerneldoc comments to common variants of
    kstrto*: kstrto(u)l, kstrto(u)ll and kstrto(u)int.

    Signed-off-by: Eldad Zack
    Cc: J. Bruce Fields
    Cc: Joe Perches
    Cc: Randy Dunlap
    Cc: Alexey Dobriyan
    Cc: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eldad Zack
     
  • keys-ecryptfs.txt was missing from 00-INDEX.

    Signed-off-by: Jarkko Sakkinen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Sakkinen
     
  • Option parsing code expects an unsigned integer for the codepage option,
    but prefixes and stores this option with "cp" before passing to
    load_nls(). This makes the displayed option in /proc an invalid one.
    Strip the prefix when printing so that the displayed option is valid for
    reuse.

    Signed-off-by: Dave Reisner
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Reisner
     
  • parse_options() is supposed to return value < 0 on error however we
    returned 0 (success) in a lot of cases. This actually was not a problem
    in practice because match_token() used by parse_options() is clever and
    catches most of the problems for us.

    Signed-off-by: Jan Kara
    Cc: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • So far FAT either offsets time stamps by sys_tz.minuteswest or leaves them
    as they are (when tz=UTC mount option is used). However in some cases it
    is useful if one can specify time stamp offset on his own (e.g. when time
    zone of the camera connected is different from time zone of the computer,
    or when HW clock is in UTC and thus sys_tz.minuteswest == 0).

    So provide a mount option time_offset= which allows user to specify offset
    in minutes that should be applied to time stamps on the filesystem.

    akpm: this code would work incorrectly when used via `mount -o remount',
    because cached inodes would not be updated. But fatfs's fat_remount() is
    basically a no-op anyway.

    Signed-off-by: Jan Kara
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Change fatfs so that a warning is emitted when an attempt is made to mount
    a filesystem with the unsupported `discard' option.

    ext4 aready does this: http://patchwork.ozlabs.org/patch/192668/

    Signed-off-by: Namjae Jeon
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • A driver for the DA9055 PMIC. This has a dependency upon the DA9055 MFD
    core.

    Functionally tested on Samsung SMDKV6410.

    Signed-off-by: David Dajun Chen
    Signed-off-by: Ashish Jangam
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashish Jangam
     
  • This eliminates having an #ifdef returning NULL for the case when OF is
    disabled.

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

    Sachin Kamat
     
  • Enabling RTC HW block depends on the default value of TPS65910 register.
    In some mode, RTC block is disabled by default.(eg. AM3517 Craneboard) In
    this case, RTC_PWDN(RTC power down) bit should be cleared to enable the
    RTC HW block.

    This patch also works in case that RTC block is active by default, because
    there is no side effect even if the bit is updated again.

    Tested on AM3517 Craneboard.

    Signed-off-by: Milo(Woogyom) Kim
    Acked-by: Venu Byravarasu
    Cc: Samuel Ortiz
    Cc: Sivaram Nair
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kim, Milo
     
  • This code is under #if 0 and not used.

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

    Sachin Kamat
     
  • rtc-s3c driver is modified to use devm_request_and_ioremap() (combining
    request_mem_region and ioremap), devm_clk_get() and devm_request_irq()
    APIs. Since this removes the necessity of freeing the related resources
    the return path is also simplified.

    Signed-off-by: Tushar Behera
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tushar Behera
     
  • err_nores label redirects to a simple return statement. Move the return
    statement to caller location and remove the label.

    Signed-off-by: Tushar Behera
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tushar Behera
     
  • Add an RTC driver for PCF8523 chips by NXP Semiconductors. No support is
    currently provided for the alarm and interrupt functions. Only the time
    and date functionality is implemented.

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

    Thierry Reding
     
  • Use devm_kzalloc() and remove the error path free and the unload free as
    devm functions take care of freeing resources.

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Miguel Aguilar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • rtc_device_register() returns a pointer containing error code in case
    of error. Use that in the error return.

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Miguel Aguilar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • A cosmetic change to rename the irq name to match the device name.

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

    Sivaram Nair
     
  • The applications can set the RTC hardware to trigger interrupts in one
    of three modes:
    * AIE: Alarm interrupt
    * UIE: Update interrupt (ie: once per second)
    * PIE: Periodic interrupt (sub-second irqs)

    The above defined 3 modes are to be supported in the RTC HW in form of
    interrupts. The SPEAr RTC hardware does not support the later two modes.

    There have been refinements in the RTC core in mainline related to
    use of timer queue infrastructure to manage events in RTC. Please refer
    the below mentioned patch for details:
    * RTC: Rework RTC code to use timerqueue for events
    * SHA ID: 6610e0893b8bc6f59b14fed7f089c5997f035f88

    There have been provisions added to support hardware that do not have
    support the UIE mode. Please refer the following patch.
    * rtc: Provide flag for rtc devices that don't support UIE
    * SHA ID: 4a649903f91232d02284d53724b0a45728111767

    The patch makes use of the provision defined in the above patch to
    update the hardware status of UIE mode.

    Signed-off-by: Deepak Sikri
    Signed-off-by: Viresh Kumar
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Deepak Sikri
     
  • clk_{un}prepare is mandatory for platforms using common clock framework.
    Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
    call them once in probe/remove.

    Signed-off-by: Deepak Sikri
    Signed-off-by: Viresh Kumar
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Deepak Sikri
     
  • Free the rtc-spear driver from tension of freeing resources :) devm_*
    derivatives of multiple routines are used while allocating resources,
    which would be freed automatically by kernel.

    Signed-off-by: Viresh Kumar
    Cc: Deepak Sikri
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Viresh Kumar
     
  • In case of error, test_init() needs to call platform_device_del() instead
    of platform_device_unregister(). Otherwise, we may call
    platform_device_put() twice.

    dpatch engine is used to auto generate this patch.
    (https://github.com/weiyj/dpatch)

    [akpm@linux-foundation.org: improve label naming]
    Signed-off-by: Wei Yongjun
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wei Yongjun
     
  • Replace the kzalloc() and kfree() calls with devm_kzalloc().

    Signed-off-by: Devendra Naga
    Cc: Alessandro Zummo
    Cc: Alexey Charkov
    Acked-by: Tony Prisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Devendra Naga
     
  • Add device tree support to the rtc-imxdi driver.

    Signed-off-by: Roland Stigge
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Sascha Hauer
    Cc: Russell King
    Cc: Shawn Guo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Stigge
     
  • Enable support for i.MX53 in addition to i.MX25 by enabling the driver on
    ARCH_MXC generally.

    Signed-off-by: Roland Stigge
    Cc: Alessandro Zummo
    Cc: Grant Likely
    Cc: Sascha Hauer
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland Stigge
     
  • OMAP1 RTC driver is used in multiple devices like, OMAPL138 and AM33XX.
    Driver currently doesn't handle any clocks, which may be right for OMAP1
    architecture but in case of AM33XX, the clock/module needs to be enabled
    in order to access the registers.

    So convert this driver to runtime pm, which internally handles rest.

    [afzal@ti.com: handle error path]
    Signed-off-by: Vaibhav Hiremath
    Signed-off-by: Afzal Mohammed
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Cc: Russell King
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Vaibhav Hiremath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vaibhav Hiremath
     
  • rtc-omap driver can be reused for AM33xx RTC. Provide dependency in
    Kconfig.

    Signed-off-by: Afzal Mohammed
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Cc: Russell King
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Vaibhav Hiremath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Afzal Mohammed
     
  • Enhance rtc-omap driver with DT capability

    Signed-off-by: Afzal Mohammed
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Cc: Russell King
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Vaibhav Hiremath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Afzal Mohammed
     
  • rtc-omap driver is now capable of handling kicker mechanism, hence remove
    kicker handling at platform level, instead provide proper device name so
    that driver can handle kicker mechanism by itself

    Signed-off-by: Afzal Mohammed
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Cc: Russell King
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Vaibhav Hiremath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Afzal Mohammed
     
  • OMAP RTC IP can have kicker feature. This prevents spurious writes to
    register. To write to registers kicker lock has to be released.
    Procedure to do it as follows,

    1. write to kick0 register, 0x83e70b13
    2. write to kick1 register, 0x95a4f1e0

    Writing value other than 0x83e70b13 to kick0 enables write locking, more
    details about kicker mechanism can be found in section 20.3.3.5.3 of
    AM335X TRM @www.ti.com/am335x

    Here id table information is added and is used to distinguish those that
    require kicker handling and the ones that doesn't need it. There are more
    features in the newer IP's compared to legacy ones other than kicker,
    which driver currently doesn't handle, supporting additional features
    would be easier with the addition of id table.

    Older IP (of OMAP1) doesn't have revision register as per TRM, so revision
    register can't be relied always to find features, hence id table is being
    used.

    While at it, replace __raw_writeb/__raw_readb with writeb/readb; this
    driver is used on ARMv7 (AM335X SoC)

    Signed-off-by: Afzal Mohammed
    Acked-by: Sekhar Nori
    Cc: Grant Likely
    Cc: Sekhar Nori
    Cc: Kevin Hilman
    Cc: Russell King
    Cc: Alessandro Zummo
    Cc: Daniel Mack
    Cc: Vaibhav Hiremath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Afzal Mohammed
     
  • If elf_core_dump() is called and fill_note_info() fails in the kmalloc()
    then it returns 0 but has not yet initialised all the needed fields. As a
    result we do a kfree(randomness) after correctly skipping the thread data.

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Store the camelcase variables in a hash and only emit a warning on the
    first use of each new variable.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Even though the kernel doesn't support using floating point constants,
    add a regex for them.

    Support forms like: 0x123p1, 123e-1, 1.23, 1.5e23f

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Hexadecimal values are current found in 2 parts. A hex constant like
    0x123456abcdef is found as 0 and then x123456abcdef and later coalesced.

    Instead, reverse the order of the 2 searches in $Constant to find 0x
    first, then 0 so that the entire hex constant is found all at once.

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • switch default case is sometimes written as "default:;". This can cause
    new cases added below the default to be defective.

    Suggest adding a break; after empty default cases to avoid fallthrough
    defects.

    Fixed indentation in the other semicolon test above it.

    Suggested-by: Peter Senna Tschudin
    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • spinlock_t should always be used.

    Signed-off-by: Joe Perches
    Acked-by: "Luis R. Rodriguez"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Blank lines around braces are not unnecessary. Emit a message on the use
    of these blank lines only when using --strict.

    int foo(int bar)
    {

    something or other....

    }

    is generally written in the kernel as:

    int foo(int bar)
    {
    something or other...
    }

    Signed-off-by: Joe Perches
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Preprocessor directives and asm statements should be allowed to have a
    line continuation.

    Signed-off-by: Joe Perches
    Tested-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Some projects might want a longer line length so allow a command line
    --max-line-length=n control over the long line warnings. The default line
    length is 80.

    Signed-off-by: Joe Perches
    Cc: Constantine Shulyupin
    Cc: Andy Whitcroft
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Consolidate the if (foo) bar(foo) detectors into a single check. Add
    debugfs_remove and family.

    Based on a patch by Constantine Shulyupin.

    Signed-off-by: Andy Whitcroft
    Cc: Constantine Shulyupin .
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Whitcroft
     
  • In commit 9c0ece069b32 ("Get rid of Documentation/feature-removal.txt"),
    Linus removes feature-removal-schedule.txt from Documentation, but there
    is still some reference to this file. So remove them.

    Signed-off-by: Tao Ma
    Acked-by: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tao Ma
     
  • This config item has not carried much meaning for a while now and is
    almost always enabled by default. As agreed during the Linux kernel
    summit, it is being removed. This will discourage future addition of
    CONFIG_EXPERIMENTAL while it is being phased out.

    Signed-off-by: Kees Cook
    Cc: Andy Whitcroft
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook