]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agofork: unshare: remove dead code
Alan Cox [Thu, 7 Feb 2013 01:27:57 +0000 (12:27 +1100)]
fork: unshare: remove dead code

If new_nsproxy is set we will always call switch_task_namespaces and then
set new_nsproxy back to NULL so the reassignment and fall through check
are redundant

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofs-seq_filec-seq_lseek-fix-switch-statement-indenting-checkpatch-fixes
Andrew Morton [Thu, 7 Feb 2013 01:27:57 +0000 (12:27 +1100)]
fs-seq_filec-seq_lseek-fix-switch-statement-indenting-checkpatch-fixes

ERROR: spaces required around that '=' (ctx:VxV)
#45: FILE: fs/seq_file.c:318:
+ while ((retval=traverse(m, offset)) == -EAGAIN)
                ^

total: 1 errors, 0 warnings, 47 lines checked

./patches/fs-seq_filec-seq_lseek-fix-switch-statement-indenting.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofs/seq_file.c:seq_lseek(): fix switch statement indenting
Andrew Morton [Thu, 7 Feb 2013 01:27:56 +0000 (12:27 +1100)]
fs/seq_file.c:seq_lseek(): fix switch statement indenting

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoseq-file: use SEEK_ macros instead of hardcoded numbers
Cyrill Gorcunov [Thu, 7 Feb 2013 01:27:56 +0000 (12:27 +1100)]
seq-file: use SEEK_ macros instead of hardcoded numbers

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofs-proc-clean-up-printks-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:56 +0000 (12:27 +1100)]
fs-proc-clean-up-printks-fix

grr

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofs/proc: clean up printks
Andrew Morton [Thu, 7 Feb 2013 01:27:55 +0000 (12:27 +1100)]
fs/proc: clean up printks

- use pr_foo() throughout

- remove a couple of duplicated KERN_WARNINGs, via WARN(KERN_WARNING "...")

- nuke a few warnings which I've never seen happen, ever.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocoredump: remove redundant defines for dumpable states
Kees Cook [Thu, 7 Feb 2013 01:27:55 +0000 (12:27 +1100)]
coredump: remove redundant defines for dumpable states

The existing SUID_DUMP_* defines duplicate the newer SUID_DUMPABLE_*
defines introduced in 54b501992dd ("coredump: warn about unsafe
suid_dumpable / core_pattern combo").  Remove the new ones, and use the
prior values instead.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reported-by: Chen Gang <gang.chen@asianux.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alan Cox <alan@linux.intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Doug Ledford <dledford@redhat.com>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: James Morris <james.l.morris@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosignalfd-add-ability-to-return-siginfo-in-a-raw-format-v2-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:55 +0000 (12:27 +1100)]
signalfd-add-ability-to-return-siginfo-in-a-raw-format-v2-fix

fix __user annotations, tidy comments and code layout

Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Andrey Vagin <avagin@openvz.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosignalfd: add ability to return siginfo in a raw format
Andrey Vagin [Thu, 7 Feb 2013 01:27:54 +0000 (12:27 +1100)]
signalfd: add ability to return siginfo in a raw format

signalfd should be called with the flag SFD_RAW for that.

signalfd_siginfo is not full for siginfo with a negative si_code.
copy_siginfo_to_user() is copied a full siginfo to user-space, if si_code
is negative.  signalfd_copyinfo() doesn't do that and can't be expanded,
because it has not compatible format with siginfo_t.

Another problem is that a constant __SI_* is removed from si_code.  It's
not a problem for usual applications, because they expect a defined type
of siginfo (internal logic).  When we want to dump pending signals, we
can't predict a type of siginfo, so we should get it from kernel.

The main idea of the raw format is that it should be enough for restoring
exactly the same siginfo for the current process.

This functionality is required for checkpointing pending signals.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosignal-allow-to-send-any-siginfo-to-itself-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:54 +0000 (12:27 +1100)]
signal-allow-to-send-any-siginfo-to-itself-fix

Cc: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agosignal: allow to send any siginfo to itself
Andrey Vagin [Thu, 7 Feb 2013 01:27:54 +0000 (12:27 +1100)]
signal: allow to send any siginfo to itself

The idea is simple.  We need to get the siginfo for each signal on
checkpointing dump, and then return it back on restore.

The first problem is that the kernel doesn't report complete siginfos to
userspace.  In a signal handler the kernel strips SI_CODE from siginfo.
When a siginfo is received from signalfd, it has a different format with
fixed sizes of fields.  The interface of signalfd was extended.  If a
signalfd is created with the flag SFD_RAW, it returns siginfo in a raw
format.

rt_sigqueueinfo looks suitable for restoring signals, but it can't
send siginfo with a positive si_code, because these codes are reserved for
the kernel.  In the real world each person has right to do anything with
himself, so I think a process should able to send any siginfo to itself.

This patch:

The kernel prevents sending of siginfo with positive si_code, because
these codes are reserved for kernel.  I think we can allow a task to send
such a siginfo to itself.  This operation should not be dangerous.

This functionality is required for restoring signals in
checkpoint/restart.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoDocumentation/cgroups/blkio-controller.txt: fix typo
Warren Turkal [Thu, 7 Feb 2013 01:27:53 +0000 (12:27 +1100)]
Documentation/cgroups/blkio-controller.txt: fix typo

Signed-off-by: Warren Turkal <wt@ooyala.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoDocumentation/DMA-API-HOWTO.txt: minor grammar corrections
Shuah Khan [Thu, 7 Feb 2013 01:27:53 +0000 (12:27 +1100)]
Documentation/DMA-API-HOWTO.txt: minor grammar corrections

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD
Namjae Jeon [Thu, 7 Feb 2013 01:27:53 +0000 (12:27 +1100)]
fat: eliminate iterations in fat_search_long and __fat_readdir in case of EOD

When doing lookups via fat_search_long(), we can stop checking for further
entries if we detect End of Directory, i.e.  if (de->name[0] == 0x00).The
current code traverses the cluster chain of a directory until a hit is
found or till the last cluster for that directory, ignoring the EOD mark.
Fix this.

Likewise,when readdir(3) is called, we can stop checking for further
entries in __fat_readdir() when we hit EOD.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ravishankar N <ravi.n1@samsung.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat: mark fs as dirty on mount and clean on umount
Oleksij Rempel [Thu, 7 Feb 2013 01:27:52 +0000 (12:27 +1100)]
fat: mark fs as dirty on mount and clean on umount

There is no documented methods to mark FAT as dirty.  Unofficially MS
started to use reserved Byte in boot sector for this purpose, at least
since Win 2000.  With Win 7 user is warned if fs is dirty and asked to
clean it.

Different versions of Win, handle it in different ways, but always have
same meaning:

- Win 2000 and XP, set it on write operations and
  remove it after operation was finnished
- Win 7, set dirty flag on first write and remove it on umount.

We will do it as follows:

- set dirty flag on mount. If fs was initially dirty, warn user,
  remember it and do not do any changes to boot sector.
- clean it on umount. If fs was initially dirty, leave it dirty.
- do not do any thing if fs mounted read-only.
- TODO: leave fs dirty if we found some error after mount.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofat: add extended fileds to struct fat_boot_sector
Oleksij Rempel [Thu, 7 Feb 2013 01:27:52 +0000 (12:27 +1100)]
fat: add extended fileds to struct fat_boot_sector

Later we will need "state" field to check if volume was cleanly unmounted.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agohfsplus: add support of manipulation by attributes file
Vyacheslav Dubeyko [Thu, 7 Feb 2013 01:27:52 +0000 (12:27 +1100)]
hfsplus: add support of manipulation by attributes file

Add support of manipulation by attributes file.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agohfsplus: rework functionality of getting, setting and deleting of extended attributes
Vyacheslav Dubeyko [Thu, 7 Feb 2013 01:27:51 +0000 (12:27 +1100)]
hfsplus: rework functionality of getting, setting and deleting of extended attributes

Rework functionality of getting, setting and deleting of extended attributes.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agohfsplus: add functionality of manipulating by records in attributes tree
Vyacheslav Dubeyko [Thu, 7 Feb 2013 01:27:51 +0000 (12:27 +1100)]
hfsplus: add functionality of manipulating by records in attributes tree

Add functionality of manipulating by records in attributes tree.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agohfsplus: add on-disk layout declarations related to attributes tree
Vyacheslav Dubeyko [Thu, 7 Feb 2013 01:27:51 +0000 (12:27 +1100)]
hfsplus: add on-disk layout declarations related to attributes tree

Add all necessary on-disk layout declarations related to attributes file.

Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agohfsplus: add osx.* prefix for handling namespace of Mac OS X extended attributes
Vyacheslav Dubeyko [Thu, 7 Feb 2013 01:27:50 +0000 (12:27 +1100)]
hfsplus: add osx.* prefix for handling namespace of Mac OS X extended attributes

hfsplus: reworked support of extended attributes.

Current mainline implementation of hfsplus file system driver treats as
extended attributes only two fields (fdType and fdCreator) of user_info
field in file description record (struct hfsplus_cat_file).  It is
possible to get or set only these two fields as extended attributes.  But
HFS+ treats as com.apple.FinderInfo extended attribute an union of
user_info and finder_info fields as for file (struct hfsplus_cat_file) as
for folder (struct hfsplus_cat_folder).  Moreover, current mainline
implementation of hfsplus file system driver doesn't support special
metadata file - attributes tree.

Mac OS X 10.4 and later support extended attributes by making use of the
HFS+ filesystem Attributes file B*-tree feature which allows for named
forks.  Mac OS X supports only inline extended attributes, limiting their
size to 3802 bytes.  Any regular file may have a list of extended
attributes.  HFS+ supports an arbitrary number of named forks.  Each
attribute is denoted by a name and the associated data.  The name is a
null-terminated Unicode string.  It is possible to list, to get, to set,
and to remove extended attributes from files or directories.

It exists some peculiarity during getting of extended attributes list by
means of getfattr utility.  The getfattr utility expects prefix "user."
before any extended attribute's name.  So, it ignores any names that don't
contained such prefix.  Such behavior of getfattr utility results in
unexpected empty output of extended attributes list even in the case when
file (or folder) contains extended attributes.  It needs to use empty
string as regular expression pattern for names matching (getfattr
--match="").

For support of extended attributes in HFS+:
1. It was added necessary on-disk layout declarations related to Attributes
   tree into hfsplus_raw.h file.
2. It was added attributes.c file with implementation of functionality of
   manipulation by records in Attributes tree.
3. It was reworked hfsplus_listxattr, hfsplus_getxattr, hfsplus_setxattr
   functions in ioctl.c. Moreover, it was added hfsplus_removexattr method.

This patch:

Add osx.* prefix for handling namespace of Mac OS X extended attributes.

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Reported-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-s3c.c: use dev_dbg() instaed of pr_debug()
Jingoo Han [Thu, 7 Feb 2013 01:27:50 +0000 (12:27 +1100)]
drivers/rtc/rtc-s3c.c: use dev_dbg() instaed of pr_debug()

Use dev_dbg() instaed of pr_debug() to be consistent.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoarm: mvebu: update defconfig with Marvell RTC support
Gregory CLEMENT [Thu, 7 Feb 2013 01:27:50 +0000 (12:27 +1100)]
arm: mvebu: update defconfig with Marvell RTC support

The RTC class driver is already part of the mvebu_defconfig but the
Marvell internal RTC not yet.  Now that its support is added for mvebu
let's update the config file.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoarm: mvebu: add RTC support for Armada 370 and Armada XP
Gregory CLEMENT [Thu, 7 Feb 2013 01:27:50 +0000 (12:27 +1100)]
arm: mvebu: add RTC support for Armada 370 and Armada XP

The Armada 370 and Armada XP Socs have the same controller that the one
used in the orion platforms.  This patch updates the device tree for these
SoCs.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pl031.c: add wakeup support
Rob Herring [Thu, 7 Feb 2013 01:27:49 +0000 (12:27 +1100)]
drivers/rtc/rtc-pl031.c: add wakeup support

Mark the pl031 as wake-up capable so that rtcwake and suspend test can work.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc rx4581: change err type from unsigned char to int in get_datetime()
Torben Hohn [Thu, 7 Feb 2013 01:27:49 +0000 (12:27 +1100)]
rtc rx4581: change err type from unsigned char to int in get_datetime()

in response to these warnings posted by dan.carpenter@oracle.com:

New smatch warnings:
drivers/rtc/rtc-rx4581.c:134 rx4581_get_datetime() warn: unsigned 'err' is never less than zero.

Old smatch warnings:
drivers/rtc/rtc-rx4581.c:175 rx4581_get_datetime() warn: unsigned 'err' is never less than zero.

Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-add-support-for-spi-rtc-rx4581-checkpatch-fixes
Andrew Morton [Thu, 7 Feb 2013 01:27:49 +0000 (12:27 +1100)]
rtc-add-support-for-spi-rtc-rx4581-checkpatch-fixes

WARNING: quoted string split across lines
#171: FILE: drivers/rtc/rtc-rx4581.c:126:
+ dev_err(dev, "Unable to write device "
+ "flags\n");

WARNING: quoted string split across lines
#214: FILE: drivers/rtc/rtc-rx4581.c:169:
+ dev_dbg(dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
+ "mday=%d, mon=%d, year=%d, wday=%d\n",

WARNING: quoted string split across lines
#233: FILE: drivers/rtc/rtc-rx4581.c:188:
+ dev_dbg(dev, "%s: secs=%d, mins=%d, hours=%d, "
+ "mday=%d, mon=%d, year=%d, wday=%d\n",

WARNING: Using __devinit is unnecessary
#310: FILE: drivers/rtc/rtc-rx4581.c:265:
+static int __devinit rx4581_probe(struct spi_device *spi)

WARNING: Using __devexit is unnecessary
#329: FILE: drivers/rtc/rtc-rx4581.c:284:
+static int __devexit rx4581_remove(struct spi_device *spi)

WARNING: space prohibited between function name and open parenthesis '('
#355: FILE: drivers/rtc/rtc-rx4581.c:310:
+MODULE_DESCRIPTION ("rx4581 spi RTC driver");

WARNING: space prohibited between function name and open parenthesis '('
#356: FILE: drivers/rtc/rtc-rx4581.c:311:
+MODULE_AUTHOR ("Torben Hohn");

WARNING: space prohibited between function name and open parenthesis '('
#357: FILE: drivers/rtc/rtc-rx4581.c:312:
+MODULE_LICENSE ("GPL");

total: 0 errors, 8 warnings, 334 lines checked

./patches/rtc-add-support-for-spi-rtc-rx4581.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: add support for spi rtc rx4581
Torben Hohn [Thu, 7 Feb 2013 01:27:48 +0000 (12:27 +1100)]
rtc: add support for spi rtc rx4581

Signed-off-by: Torben Hohn <torbenh@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-tps65910.c: set irq flag to IRQF_EARLY_RESUME during irq request
Laxman Dewangan [Thu, 7 Feb 2013 01:27:48 +0000 (12:27 +1100)]
drivers/rtc/rtc-tps65910.c: set irq flag to IRQF_EARLY_RESUME during irq request

All interrupt get disabled during system suspend and enabled during system
resume.  The enabling/disabling of interrupt happen in sequence of
interrupt registration with framework.

Therefore, in resume, the parent interrupt of this device enabled before
the RTC irq interrupt enabled.  If RTC is enabled for alarm wake and if
system wake by alarm then there is interrupt pending for RTC.  In resume,
the parent interrupt get enabled before the rtc interrupt and hence ISR
get served.  In ISR, it founds that rtc interrupt is disabled and so it
does not call the rtc isr handler and hence it misses the interrupt.

Setting flag for early resume so that rtc interrupt get enabled before
parent interrupt and so rtc interrupt get enabled when parent interrupt
handler check for interrupt of device and call the rtc handler if it is
there.  This way it will not miss the interrupt.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-tps65910.c: use sleep_pm_ops macro for initialising suspend/resume...
Laxman Dewangan [Thu, 7 Feb 2013 01:27:48 +0000 (12:27 +1100)]
drivers/rtc/rtc-tps65910.c: use sleep_pm_ops macro for initialising suspend/resume callbacks

Use SET_SYSTEM_SLEEP_PM_OPS for setting suspend/resume callbacks for
dev_pm_ops.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-tps65910.c: remove unnecessary irq stat save and restore
Laxman Dewangan [Thu, 7 Feb 2013 01:27:47 +0000 (12:27 +1100)]
drivers/rtc/rtc-tps65910.c: remove unnecessary irq stat save and restore

The driver stores the interrupt enable register before going to suspend
and restore in resume.  Also it enables alarm before going to suspend.

The driver only write the Interrupt enable register for enabling ALARM and
does not enable any other bits.  So it is not require to save complete
register and enable ALARM interrupt before suspend and restore in resume.

Also ALARM interrupt already enable if alarm is enabled before going to
suspend and hence it is not require to enable explictly in suspend.

Removing such above code.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-tps65910.c: enable/disable wake in suspend/resume
Laxman Dewangan [Thu, 7 Feb 2013 01:27:47 +0000 (12:27 +1100)]
drivers/rtc/rtc-tps65910.c: enable/disable wake in suspend/resume

Making the rtc driver as wakeup capabale and leaving the wake
enable/disable decision to user space through a sysfs attribute.

In suspend, enable wake if device wakeup enabled.  In resume disable wake
again.

This change is inline with the Documentation/power/devices.txt#
/sys/devices/.../power/wakeup files

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-add-rtc-driver-for-tps80031-tps80032-v2-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:47 +0000 (12:27 +1100)]
rtc-add-rtc-driver-for-tps80031-tps80032-v2-fix

remove obsolete __devinit/__devexit

Cc: Devendra Naga <devendra.aaru@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-add-rtc-driver-for-tps80031-tps80032-v2
Laxman Dewangan [Thu, 7 Feb 2013 01:27:46 +0000 (12:27 +1100)]
rtc-add-rtc-driver-for-tps80031-tps80032-v2

Changes from V1:
- remvoe the checks for alarm time whether this is past or not in set_alarm.
- add error prints if rtc registration failed.
- add include of pm.h

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: add RTC driver for TPS80031/TPS80032
Laxman Dewangan [Thu, 7 Feb 2013 01:27:46 +0000 (12:27 +1100)]
rtc: add RTC driver for TPS80031/TPS80032

Add an RTC driver for TPS80031/TPS80032 chips by TI.
This driver supports:
- Setting and getting time and date.
- Setting and reading alarm time.
- Alarm and interrupt functionlity.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: add new lp8788 rtc driver
Kim, Milo [Thu, 7 Feb 2013 01:27:46 +0000 (12:27 +1100)]
rtc: add new lp8788 rtc driver

TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight
driver and current sinks.  This patch enables LP8788 rtc module.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-ds2404.c: use module_platform_driver macro
Srinivas Kandagatla [Thu, 7 Feb 2013 01:27:45 +0000 (12:27 +1100)]
drivers/rtc/rtc-ds2404.c: use module_platform_driver macro

Remove removes some code duplication by using module_platform_driver().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc: remove unnecessary semicolons
Peter Senna Tschudin [Thu, 7 Feb 2013 01:27:45 +0000 (12:27 +1100)]
drivers/rtc: remove unnecessary semicolons

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: avoid cpuid checking
Haojian Zhuang [Thu, 7 Feb 2013 01:27:45 +0000 (12:27 +1100)]
drivers/rtc/rtc-pxa.c: avoid cpuid checking

pxa-rtc is widely used in pxa27x/pxa3xx/pxa93x/pxa95x. Checking cpuid in
pxa-rtc driver is unnecessary since we assign on-chip device in soc files.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-twl: use of_match_ptr() macro
Sachin Kamat [Thu, 7 Feb 2013 01:27:44 +0000 (12:27 +1100)]
drivers/rtc/rtc-twl: use of_match_ptr() macro

Used of_match_ptr() macro with CONFIG_OF defined.
This maintains code consistency with the rest of the drivers.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc: use of_match_ptr() macro
Sachin Kamat [Thu, 7 Feb 2013 01:27:44 +0000 (12:27 +1100)]
drivers/rtc: use of_match_ptr() macro

This eliminates having an #ifdef returning NULL for the case when OF is
disabled.  Maintains consistency in cases where OF is always selected.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-pcf8523-add-low-battery-voltage-support-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:44 +0000 (12:27 +1100)]
rtc-pcf8523-add-low-battery-voltage-support-fix

omit pcf8563_rtc_ioctl() if CONFIG_RTC_INTF_DEV=n

Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-pcf8523: add low battery voltage support
Jesper Nilsson [Thu, 7 Feb 2013 01:27:43 +0000 (12:27 +1100)]
rtc-pcf8523: add low battery voltage support

Implement reading of the battery voltage low signal for rtc-pcf8523.

The bit is read-only and cannot be cleared by software, so no
clear function is implemented.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-max77686-add-maxim-77686-driver-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:43 +0000 (12:27 +1100)]
rtc-max77686-add-maxim-77686-driver-fix

remove inline, __devinit annotations

Cc: Chiwoong Byun <woong.byun@samsung.com>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Myugnjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc: max77686: add Maxim 77686 driver
Jonghwa Lee [Thu, 7 Feb 2013 01:27:43 +0000 (12:27 +1100)]
rtc: max77686: add Maxim 77686 driver

Add a driver to support max77686 rtc.  MAX77686 rtc support smpl and wtsr
mode.  It has two alarm register which can be used for alarming to wake
system up.  This drvier uses regmap to access its register.

Signed-off-by: Chiwoong Byun <woong.byun@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Myugnjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agortc-ds1307-long-block-operations-bugfix-fix
Andrew Morton [Thu, 7 Feb 2013 01:27:43 +0000 (12:27 +1100)]
rtc-ds1307-long-block-operations-bugfix-fix

rework code to avoid 80-column overflows

Cc: Bertrand Achard <ba@cykian.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-ds1307.c: long block operations bugfix
Bertrand Achard [Thu, 7 Feb 2013 01:27:42 +0000 (12:27 +1100)]
drivers/rtc/rtc-ds1307.c: long block operations bugfix

The rtc-ds1307 driver does not properly handle block operations bigger
than 32 bytes in either of the two modes supported (SMbus native, or
emulated if not supported by the SMbus platform driver).

It also does not properly handle userland-supplied input (block operation
length) through sysfs and may suffer a type of buffer overrun.

The driver has been modified with proper input validation, buffer sizes,
and now splits block transfers bigger than 32 bytes into separate
transfers.

Explanation : Buffer size allocated is I2C_SMBUS_BLOCK_MAX which equals to
32 as per the SMbus spec.  Reads and write may be up to 56 bytes (to the
NVRAM).  This patch allocated a 255 byte buffer, the maximum allowable
(address is an u8).  It's not only a buffer problem, SMbus only supports
up to 32 bytes transfer at once, so it's needed to split bigger transfers.

Patch successfully tested on 3.2.27; cleanly applies on 3.7-rc4.

Signed-off-by: Bertrand Achard <ba@cykian.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers-rtc-rtc-pxac-fix-set-time-sync-time-issue-fix
Olof Johansson [Thu, 7 Feb 2013 01:27:42 +0000 (12:27 +1100)]
drivers-rtc-rtc-pxac-fix-set-time-sync-time-issue-fix

The "fix set time sync time issue" adds calls to udelay(), but
doesn't add the include file. End result is build breakage:

drivers/rtc/rtc-pxa.c: In function 'pxa_rtc_set_time':
drivers/rtc/rtc-pxa.c:267:2: error: implicit declaration of function 'udelay' [-Werror=implicit-function-declaration]

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix set time sync time issue
Leo Song [Thu, 7 Feb 2013 01:27:42 +0000 (12:27 +1100)]
drivers/rtc/rtc-pxa.c: fix set time sync time issue

Fix set time and sync time issue, add some delay when set pxa rtc timer
according to spec

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix alarm can't wake up system issue
Leo Song [Thu, 7 Feb 2013 01:27:41 +0000 (12:27 +1100)]
drivers/rtc/rtc-pxa.c: fix alarm can't wake up system issue

Fix alarm can't wake up system issue

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc/rtc-pxa.c: fix alarm not match issue
Leo Song [Thu, 7 Feb 2013 01:27:41 +0000 (12:27 +1100)]
drivers/rtc/rtc-pxa.c: fix alarm not match issue

Fix pxa rtc alarm issue by setting week of month and day of week in
rdar/rdcr or it would not match.

Signed-off-by: Leo Song <liangs@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/rtc: dump small buffers via %*ph
Andy Shevchenko [Thu, 7 Feb 2013 01:27:41 +0000 (12:27 +1100)]
drivers/rtc: dump small buffers via %*ph

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agokernel/nsproxy.c: remove duplicate task_cred_xxx for user_ns
Yuanhan Liu [Thu, 7 Feb 2013 01:27:40 +0000 (12:27 +1100)]
kernel/nsproxy.c: remove duplicate task_cred_xxx for user_ns

We can use user_ns, which is also assigned from task_cred_xxx(tsk,
user_ns), at the beginning of copy_namespaces().

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobinfmt_elf.c: use get_random_int() to fix entropy depleting
Jeff Liu [Thu, 7 Feb 2013 01:27:40 +0000 (12:27 +1100)]
binfmt_elf.c: use get_random_int() to fix entropy depleting

Entropy is quickly depleted under normal operations like ls(1), cat(1),
etc...  between 2.6.30 to current mainline, for instance:

$ cat /proc/sys/kernel/random/entropy_avail
3428
$ cat /proc/sys/kernel/random/entropy_avail
2911
$cat /proc/sys/kernel/random/entropy_avail
2620

We observed this problem has been occurring since 2.6.30 with
fs/binfmt_elf.c: create_elf_tables()->get_random_bytes(), introduced by
f06295b44c296c8f ("ELF: implement AT_RANDOM for glibc PRNG seeding").

/*
 * Generate 16 random bytes for userspace PRNG seeding.
 */
get_random_bytes(k_rand_bytes, sizeof(k_rand_bytes));

The patch introduces a wrapper around get_random_int() which has lower
overhead than calling get_random_bytes() directly.

With this patch applied:
$ cat /proc/sys/kernel/random/entropy_avail
2731
$ cat /proc/sys/kernel/random/entropy_avail
2802
$ cat /proc/sys/kernel/random/entropy_avail
2878

Analyzed by John Sobecki.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Dilger <aedilger@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Arnd Bergmann <arnn@arndb.de>
Cc: John Sobecki <john.sobecki@oracle.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Ted Ts'o <tytso@mit.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobinfmt_elf: remove unused argument in fill_elf_header
Zhang Yanfei [Thu, 7 Feb 2013 01:27:40 +0000 (12:27 +1100)]
binfmt_elf: remove unused argument in fill_elf_header

In fill_elf_header(), elf->e_ident[EI_OSABI] is always set to ELF_OSABI,
so remove the unused argument 'osabi'.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoepoll: stop comparing pointers with 0 in self-test app
Sasha Levin [Thu, 7 Feb 2013 01:27:39 +0000 (12:27 +1100)]
epoll: stop comparing pointers with 0 in self-test app

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Reviewed-by: Daniel Hazelton <dshadowwolf@gmail.com>
Cc: "Paton J. Lewis" <palewis@adobe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoepoll: support for disabling items, and a self-test app
Paton J. Lewis [Thu, 7 Feb 2013 01:27:39 +0000 (12:27 +1100)]
epoll: support for disabling items, and a self-test app

It is not currently possible to reliably delete epoll items when using the
same epoll set from multiple threads.  After calling epoll_ctl with
EPOLL_CTL_DEL, another thread might still be executing code related to an
event for that epoll item (in response to epoll_wait).  Therefore the
deleting thread does not know when it is safe to delete resources
pertaining to the associated epoll item because another thread might be
using those resources.

The deleting thread could wait an arbitrary amount of time after calling
epoll_ctl with EPOLL_CTL_DEL and before deleting the item, but this is
inefficient and could result in the destruction of resources before
another thread is done handling an event returned by epoll_wait.

This patch enhances epoll_ctl to support EPOLL_CTL_DISABLE, which disables
an epoll item.  If epoll_ctl returns -EBUSY in this case, then another
thread may handling a return from epoll_wait for this item.  Otherwise if
epoll_ctl returns 0, then it is safe to delete the epoll item.  This
allows multiple threads to use a mutex to determine when it is safe to
delete an epoll item and its associated resources, which allows epoll
items to be deleted both efficiently and without error in a multi-threaded
environment.  Note that EPOLL_CTL_DISABLE is only useful in conjunction
with EPOLLONESHOT, and using EPOLL_CTL_DISABLE on an epoll item without
EPOLLONESHOT returns -EINVAL.

This patch also adds a new test_epoll self-test program to both
demonstrate the need for this feature and test it.

Signed-off-by: Paton J. Lewis <palewis@adobe.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Paul Holland <pholland@adobe.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: fix USLEEP_RANGE test
Bruce Allan [Thu, 7 Feb 2013 01:27:39 +0000 (12:27 +1100)]
checkpatch: fix USLEEP_RANGE test

Do not test udelay() for a value less than 10usec when passed a variable
instead of a hard-coded number; there is no way for checkpatch to know the
value of the variable.  As it is today, it will complain about variables
with alphanumeric characters plus '_', e.g.  foo_bar, but not variables
with other characters, eg.  foo->bar.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: Add check for kcalloc argument order
Joe Perches [Thu, 7 Feb 2013 01:27:38 +0000 (12:27 +1100)]
checkpatch: Add check for kcalloc argument order

kcalloc is sometimes misused with the first and second arguments switched.

Same issue with kmalloc_array too.

Bleat if sizeof is the first argument

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: don't emit the CamelCase warning for PageFoo
Joe Perches [Thu, 7 Feb 2013 01:27:38 +0000 (12:27 +1100)]
checkpatch: don't emit the CamelCase warning for PageFoo

I'm getting a ton of these:

WARNING: Avoid CamelCase: <PageTransHuge>
#140: FILE: mm/migrate.c:1576:
+       if (PageTransHuge(page) && page_count(page) != 3) {

So exclude anything which starts with "Page".

Tested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: add Joe to MAINTAINERS
Joe Perches [Thu, 7 Feb 2013 01:27:38 +0000 (12:27 +1100)]
checkpatch: add Joe to MAINTAINERS

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: warn on unnecessary __dev<foo> section markings
Joe Perches [Thu, 7 Feb 2013 01:27:37 +0000 (12:27 +1100)]
checkpatch: warn on unnecessary __dev<foo> section markings

Get people to stop adding __devinit and __devexit section markings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agocheckpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL>
Joe Perches [Thu, 7 Feb 2013 01:27:37 +0000 (12:27 +1100)]
checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL>

Add YA check to printk style.

dev_<level> uses are functions and generate smaller
object code than dev_printk(KERN_<LEVEL>.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: make the default XZ_DEC_* config match the selected architecture
Florian Fainelli [Thu, 7 Feb 2013 01:27:37 +0000 (12:27 +1100)]
decompressors: make the default XZ_DEC_* config match the selected architecture

Change the defautl XZ_DEC_* config symbol to match the configured
architecture.  It is perfectly legitimate to support multiple XZ BCJ
filters for different architectures (e.g.: to mount foreign squashfs/xz
compressed filesystems), it is however more natural not to select them all
by default, but only the one matching the configured architecture.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: drop dependency on CONFIG_EXPERT
Florian Fainelli [Thu, 7 Feb 2013 01:27:36 +0000 (12:27 +1100)]
decompressors: drop dependency on CONFIG_EXPERT

Remove the XZ_DEC_* depedencey on CONFIG_EXPERT as recommended by Lasse
Colin.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodecompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif
Florian Fainelli [Thu, 7 Feb 2013 01:27:36 +0000 (12:27 +1100)]
decompressors: group XZ_DEC_* symbols under an if XZ_BCJ / endif

Group all architecture-specific BCJ filter configuration symbols under an
if XZ_BCJ / endif statement.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lasse Collin <lasse.collin@tukaani.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agolib/parser.c: fix up comments for valid return values from match_number
Namjae Jeon [Thu, 7 Feb 2013 01:27:36 +0000 (12:27 +1100)]
lib/parser.c: fix up comments for valid return values from match_number

match_number() has return values of -ENOMEM, -EINVAL and -ERANGE.  So, for
all the functions calling match_number, the return value should include
these values.  Fix up the comments to reflect the correct values.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/leds/leds-ot200.c: fix error caused by shifted mask
Christian Gmeiner [Thu, 7 Feb 2013 01:27:36 +0000 (12:27 +1100)]
drivers/leds/leds-ot200.c: fix error caused by shifted mask

During the development of this driver an in-house register documentation
was used.  The last week some integration tests were done and this problem
was found.  It turned out that the released register documentation is
wrong.

The fix is very simple: shift all masks by one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()
Jingoo Han [Thu, 7 Feb 2013 01:27:35 +0000 (12:27 +1100)]
drivers/video/backlight/lm3630_bl.c: remove ret = -EIO of lm3630_backlight_register()

There is no need to return -EIO, because backlight_device_register()
already returns correct error values.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctly
Dan Carpenter [Thu, 7 Feb 2013 01:27:35 +0000 (12:27 +1100)]
drivers/video/backlight/s6e63m0.c: report ->gamma_table_count correctly

gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to int.

The current code sets ->gamma_table_count to 6 on 64bit arches and to 3 on
32 bit arches.  It should be 3 on everything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/88pm860x_bl.c: add missing of_node_put()
Axel Lin [Thu, 7 Feb 2013 01:27:35 +0000 (12:27 +1100)]
drivers/video/backlight/88pm860x_bl.c: add missing of_node_put()

of_find_node_by_name() returns a node pointer with refcount incremented,
use of_node_put() on it when done.

of_find_node_by_name() will call of_node_put() against the node pass to
from parameter, thus we also need to call of_node_get(from) before calling
of_find_node_by_name().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: as3711: fix compilation breakage
Guennadi Liakhovetski [Thu, 7 Feb 2013 01:27:34 +0000 (12:27 +1100)]
backlight: as3711: fix compilation breakage

Include the missing platform_device.h header to fix errors like

error: implicit declaration of function 'platform_set_drvdata'

and similar.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add an AS3711 PMIC backlight driver
Guennadi Liakhovetski [Thu, 7 Feb 2013 01:27:34 +0000 (12:27 +1100)]
backlight: add an AS3711 PMIC backlight driver

This is an initial commit of a backlight driver, using step-up DCDC power
supplies on AS3711 PMIC. Only one mode has actually been tested, several
further modes have been implemented "dry," but disabled to avoid accidental
hardware damage. Anyone wishing to use any of those modes will have to
modify the driver.

Tested on sh73a0-based kzm9g board.  Only one mode has been tested and is
enabled.  That mode copies the sample code from the manufacturer.
Deviations from that code proved to be fatal for the hardware...

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/Makefile: cleanup
Andrew Morton [Thu, 7 Feb 2013 01:27:34 +0000 (12:27 +1100)]
drivers/video/backlight/Makefile: cleanup

Fix up indenting.  Also alphasort all entries, which reduces patch
collisions.

Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agofb: backlight: add the Himax HX-8357B LCD controller
Maxime Ripard [Thu, 7 Feb 2013 01:27:33 +0000 (12:27 +1100)]
fb: backlight: add the Himax HX-8357B LCD controller

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Brian Lilly <brian@crystalfontz.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/ld9040.c: use devm_regulator_bulk_get() API
Sachin Kamat [Thu, 7 Feb 2013 01:27:33 +0000 (12:27 +1100)]
drivers/video/backlight/ld9040.c: use devm_regulator_bulk_get() API

devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/l4f00242t03.c: convert to devm_regulator_get()
Axel Lin [Thu, 7 Feb 2013 01:27:33 +0000 (12:27 +1100)]
drivers/video/backlight/l4f00242t03.c: convert to devm_regulator_get()

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Cc: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodrivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe
Devendra Naga [Thu, 7 Feb 2013 01:27:32 +0000 (12:27 +1100)]
drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe

The APIs are returning correctly the err codes, no need to assign -EIO
to the ret again.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use lcd_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:32 +0000 (12:27 +1100)]
backlight: corgi_lcd: use lcd_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using lcd_device
instead of using dev_get_drvdata with &ld->dev, so we can directly pass a
struct lcd_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: omap1: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:32 +0000 (12:27 +1100)]
backlight: omap1: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tosa: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:31 +0000 (12:27 +1100)]
backlight: tosa: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:31 +0000 (12:27 +1100)]
backlight: corgi_lcd: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:31 +0000 (12:27 +1100)]
backlight: ams369fg06: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agopwm_backlight: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:30 +0000 (12:27 +1100)]
pwm_backlight: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: aat2870: use bl_get_data instead of dev_get_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:30 +0000 (12:27 +1100)]
backlight: aat2870: use bl_get_data instead of dev_get_drvdata

Use the wrapper function for getting the driver data using
backlight_device instead of using dev_get_drvdata with &bd->dev, so we can
directly pass a struct backlight_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: lms501kf03: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:30 +0000 (12:27 +1100)]
backlight: lms501kf03: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: corgi_lcd: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:29 +0000 (12:27 +1100)]
backlight: corgi_lcd: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tosa: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:29 +0000 (12:27 +1100)]
backlight: tosa: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: vgg2432a4: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:29 +0000 (12:27 +1100)]
backlight: vgg2432a4: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:28 +0000 (12:27 +1100)]
backlight: ams369fg06: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: lms283gf05: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:28 +0000 (12:27 +1100)]
backlight: lms283gf05: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: tdo24m: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:28 +0000 (12:27 +1100)]
backlight: tdo24m: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ltv350qv: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:28 +0000 (12:27 +1100)]
backlight: ltv350qv: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: s6e63m0: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:27 +0000 (12:27 +1100)]
backlight: s6e63m0: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ld9040: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:27 +0000 (12:27 +1100)]
backlight: ld9040: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: l4f00242t03: use spi_get_drvdata and spi_set_drvdata
Jingoo Han [Thu, 7 Feb 2013 01:27:27 +0000 (12:27 +1100)]
backlight: l4f00242t03: use spi_get_drvdata and spi_set_drvdata

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight-add-new-lp8788-backlight-driver-checkpatch-fixes
Andrew Morton [Thu, 7 Feb 2013 01:27:26 +0000 (12:27 +1100)]
backlight-add-new-lp8788-backlight-driver-checkpatch-fixes

WARNING: please write a paragraph that describes the config symbol fully
#45: FILE: drivers/video/backlight/Kconfig:380:
+config BACKLIGHT_LP8788

ERROR: code indent should use tabs where possible
#446: FILE: include/linux/mfd/lp8788.h:242:
+^I^I            Only valid when bl_mode is LP8788_BL_COMB_PWM_BASED$

total: 1 errors, 1 warnings, 403 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

./patches/backlight-add-new-lp8788-backlight-driver.patch has style problems, please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kim, Milo" <Milo.Kim@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: add new lp8788 backlight driver
Kim, Milo [Thu, 7 Feb 2013 01:27:26 +0000 (12:27 +1100)]
backlight: add new lp8788 backlight driver

TI LP8788 PMU supports regulators, battery charger, RTC, ADC, backlight
dri= ver and current sinks.  This patch enables LP8788 backlight module.

(Brightness mode)
The brightness is controlled by PWM input or I2C register.
All modes are supported in the driver.

(Platform data)
Configurable data can be defined in the platform side.
 name                  : backlight driver name. (default: "lcd-backlight")
 initial_brightness    : initial value of backlight brightness
 bl_mode               : brightness control by PWM or lp8788 register
 dim_mode              : dimming mode selection
 full_scale            : full scale current setting
 rise_time             : brightness ramp up step time
 fall_time             : brightness ramp down step time
 pwm_pol               : PWM polarity setting when bl_mode is PWM based
 period_ns             : platform specific PWM period value. unit is nano.

The default values are set in case no platform data is defined.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: "devendra.aaru" <devendra.aaru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: reorder inclusions of <linux/xxx.h>
Jingoo Han [Thu, 7 Feb 2013 01:27:26 +0000 (12:27 +1100)]
backlight: ams369fg06: reorder inclusions of <linux/xxx.h>

Reorder inclusions of <linux/xxx.h> for redability, according to
alphabetical ordering.  Also, unnecessary header comments are removed.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agobacklight: ams369fg06: remove redundant variable 'before_power'
Jingoo Han [Thu, 7 Feb 2013 01:27:25 +0000 (12:27 +1100)]
backlight: ams369fg06: remove redundant variable 'before_power'

'before_power' was used to check the previous status when resume() is
called.  However, FB_BLANK_POWERDOWN was used in suspend() all the time,
so there is no need to check the previous status.  Also, redundant return
variables are removed to reduce the code.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>