Due to using devm_regulator_bulk_get() the LDO regulator which may
have been registered is still referenced when ldo_regulator_remove()
tries to unregister it. This leads to the following warning from the
regulator subsystem (and makes it impossible to unload the
snd-soc-sgtl5000 module):
usb: musb: core: properly setup the HW before registering it to the USB core
Without this patch overriding the USBOTG_ID pin by setting the iddig
bit in the USB_MODE register doesn't work because it obviously is done
too late to be recognized correctly.
Currently unloading and reloading the usb-am335x module will render
the USB driver non-functional. This is because of_platform_populate()
does nothing upon reload because the OF_POPULATED flag will still be
set on the device nodes from the first module load.
Clearing this flag when unregistering the devices makes this driver
functional also upon repeated unload/load sequences.
- remove comma after end of list delimiter
The empty entry must always be the last item in the list, thus there
is no point in having a trailing comma to facilitate adding
succeding entries.
Remove the comma, so that inadvertedly adding an entry after the end
of list sentinel will produce a compile time error rather than an
unreachable entry in the list.
- consistently use tabs for indentation
ARM: dts: am335x-tx48: remove pinctrl from usb0_phy
The pins used for VBUSEN and OC in host mode are also used for the 2nd
CAN interface. When the USB0 interface is used in device mode, the
pins can still be used for the CAN interface if they are not claimed
by the USB PHY driver. Thus move the pinctrl reference to the
reg_usbotg which will only claim them for host mode.
Lothar Waßmann [Fri, 27 Jun 2014 09:26:36 +0000 (11:26 +0200)]
ARM: dts: am335x-tx48: cleanup
- sort nodes alphabetically
- move 'status' property to end of property list
- reduce indentation level of pinctrl comments
- rename sound card model to 'TX48-SGTL5000'
Lothar Waßmann [Wed, 11 Dec 2013 15:18:35 +0000 (16:18 +0100)]
spi: omap2-mcspi: general cleanups
- fix indentations
- remove useles initialization of regs_offset
- remove blank line at end of function
- remove comma after end marker in struct initializer
However the feature can be useful for other relatively slow or untrusted
BDIs like USB flash drives and DVD+RW. The patch adds a knob to enable
the feature:
echo 1 > /sys/class/bdi/X:Y/strictlimit
Being enabled, the feature enforces bdi max_ratio limit even if global
(10%) dirty limit is not reached. Of course, the effect is not visible
until /sys/class/bdi/X:Y/max_ratio is decreased to some reasonable value.
Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Theodore Ts'o <tytso@mit.edu> Cc: "Artem S. Tashkinov" <t.artem@lycos.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Jan Kara <jack@suse.cz> Cc: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Levente Kurusa [Thu, 26 Jun 2014 00:43:24 +0000 (10:43 +1000)]
drivers/w1/w1_int.c: call put_device if device_register fails
Currently, memsetting and kfreeing the device is bad behaviour. The
device will have a reference count of 1 and hence can cause trouble
because it has kfree'd. Proper way to handle a failed device_register is
to call put_device right after it fails.
Namjae Jeon [Thu, 26 Jun 2014 00:43:23 +0000 (10:43 +1000)]
fat: fallback to buffered write in case of fallocated region on direct IO
For normal cases of direct IO write, trying to seek to location greater
than file size, makes it fall back to buffered write to fill that region.
Similarly, in case for write in Fallocated region, make it fall to
buffered write.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Namjae Jeon [Thu, 26 Jun 2014 00:43:23 +0000 (10:43 +1000)]
fat: zero out seek range on _fat_get_block
For normal buffered write operations, normally if we try to write to an
offset > than file size, it does a cont_expand_zero till that offset.
Now, in case of fallocated regions, since the blocks are already
allocated. So, make it zero out that buffers for those blocks till the
seek'ed offset.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Namjae Jeon [Thu, 26 Jun 2014 00:43:22 +0000 (10:43 +1000)]
fat: add fat_fallocate operation
Implement preallocation via the fallocate syscall on VFAT partitions.
This patch is based on an earlier patch of the same name which had some
issues detailed below and did not get accepted. Refer
https://lkml.org/lkml/2007/12/22/130.
a) The preallocated space was not persistent when the
FALLOC_FL_KEEP_SIZE flag was set. It will deallocate cluster at evict
time.
b) There was no need to zero out the clusters when the flag was set
Instead of doing an expanding truncate, just allocate clusters and add
them to the fat chain. This reduces preallocation time.
Compatibility with windows:
There are no issues when FALLOC_FL_KEEP_SIZE is not set because it just
does an expanding truncate. Thus reading from the preallocated area on
windows returns null until data is written to it.
When a file with preallocated area using the FALLOC_FL_KEEP_SIZE was
written to on windows, the windows driver freed-up the preallocated
clusters and allocated new clusters for the new data. The freed up
clusters gets reflected in the free space available for the partition
which can be seen from the Volume properties.
The windows chkdsk tool also does not report any errors on a disk
containing files with preallocated space.
And there is also no issue using linux fat fsck. because discard
preallocated clusters at repair time.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Michal Hocko [Thu, 26 Jun 2014 00:43:22 +0000 (10:43 +1000)]
memcg: deprecate memory.force_empty knob
force_empty has been introduced primarily to drop memory before it gets
reparented on the group removal. This alone doesn't sound fully justified
because reparented pages which are not in use can be reclaimed also later
when there is a memory pressure on the parent level.
Mark the knob CFTYPE_INSANE which tells the cgroup core that it shouldn't
create the knob with the experimental sane_behavior. Other users will get
informed about the deprecation and asked to tell us more because I do not
expect most users will use sane_behavior cgroups mode very soon.
Anyway I expect that most users will be simply cgroup remove handlers
which do that since ever without having any good reason for it.
If somebody really cares because reparented pages, which would be dropped
otherwise, push out more important ones then we should fix the reparenting
code and put pages to the tail.
Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Greg Thelen <gthelen@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm: replace remap_file_pages() syscall with emulation
remap_file_pages(2) was invented to be able efficiently map parts of huge
file into limited 32-bit virtual address space such as in database
workloads.
Nonlinear mappings are pain to support and it seems there's no legitimate
use-cases nowadays since 64-bit systems are widely available.
Let's drop it and get rid of all these special-cased code.
The patch replaces the syscall with emulation which creates new VMA on
each remap_file_pages(), unless they it can be merged with an adjacent
one.
I didn't find *any* real code that uses remap_file_pages(2) to test
emulation impact on. I've checked Debian code search and source of all
packages in ALT Linux. No real users: libc wrappers, mentions in strace,
gdb, valgrind and this kind of stuff.
There are few basic tests in LTP for the syscall. They work just fine
with emulation.
To test performance impact, I've written small test case which demonstrate
pretty much worst case scenario: map 4G shmfs file, write to begin of
every page pgoff of the page, remap pages in reverse order, read every
page.
The test creates 1 million of VMAs if emulation is in use, so I had to set
vm.max_map_count to 1100000 to avoid -ENOMEM.
Fabian Frederick [Thu, 26 Jun 2014 00:43:21 +0000 (10:43 +1000)]
kernel/kprobes.c: convert printk to pr_foo()
Also fixes some checkpatch warnings
-Static initialization
-Lines over 80 characters
Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:21 +0000 (10:43 +1000)]
drivers/net/ethernet/amd/pcnet32.c: neaten and remove unnecessary OOM messages
Make the code flow a little better for 80 columns.
Use a consistent style for the RX and TX rings allocation.
Use BIT macro.
Use a temporary unsiged int entries for (1<<size).
Remove the OOM messages as they duplicate the generic
OOM and dump_stack() provided by the memory subsystem.
Reflow allocs to 80 columns.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
rtlwifi: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
ipw2100: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:19 +0000 (10:43 +1000)]
irda: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Samuel Ortiz <samuel@sortiz.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)]
sky2: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:18 +0000 (10:43 +1000)]
enic: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Sujith Sankar <ssujith@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Neel Patel <neepatel@cisco.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:17 +0000 (10:43 +1000)]
amd: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Don Fry <pcnet32@frontier.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Joe Perches [Thu, 26 Jun 2014 00:43:17 +0000 (10:43 +1000)]
infiniband: use pci_zalloc_consistent
Remove the now unnecessary memset too.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Tom Tucker <tom@opengridcomputing.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:16 +0000 (10:43 +1000)]
include/linux: remove strict_strto* definitions
Remove obsolete and unused strict_strto* functions
Signed-off-by: Daniel Walter <dwalter@google.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
net/sunrpc: replace strict_strto calls
Replace obsolete strict_strto calls with appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
drivers/scsi: replace strict_strto calls
Replace obsolete strict_strto with more appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Daniel Walter [Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)]
arch/x86: replace strict_strto calls
Replace obsolete strict_strto calls with appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Acked-by: Borislav Petkov <bp@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Replace strict_strto calls with more appropriate kstrto calls
Signed-off-by: Daniel Walter <dwalter@google.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>