Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Use devm_ioremap_resource instead of devm_request_and_ioremap.
This was done using the semantic patch
scripts/coccinelle/api/devm_ioremap_resource.cocci
The relevant call to platform_get_resource was manually moved down to the
call to devm_ioremap_resource.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
kcalloc can return NULL. Check the pointer before dereferencing.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
'const' was added twice.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
kfree on a NULL pointer is a no-op. Null pointer check is
not necessary.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Trivial fix for function name mismatches I stumbled over.
Signed-off-by: Daniel Mack <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Add support for HPB-DMAC found in Renesas R-Car SoCs, using 'shdma-base' DMA
driver framework.
Based on the original patch by Phil Edworthy <[email protected]>.
Signed-off-by: Max Filippov <[email protected]>
[Sergei: removed useless #include, sorted #include's, fixed HPB_DMA_TCR_MAX,
fixed formats and removed line breaks in the dev_dbg() calls, rephrased and
added IRQ # to the shdma_request_irq() failure message, added MODULE_AUTHOR(),
removed '__init'/'__exit' annotations from the probe()/remove() methods, removed
'__initdata' annotation from 'hpb_dmae_driver', fixed guard macro name in the
header file, fixed #define ASYNCRSTR_ASRST20, added #define ASYNCRSTR_ASRST24,
added the necessary runtime PM calls to the probe() and remove() methods,
handled errors returned by dma_async_device_register(), beautified comments
and #define's.]
Signed-off-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Zhangfei Gao <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Instead of using data from stack for DMA in hidinput_get_battery_property(),
allocate the buffer dynamically.
Cc: [email protected]
Reported-by: Richard Ryniker <[email protected]>
Reported-by: Alan Stern <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
KonePureOptical is a KonePure with different sensor.
Signed-off-by: Stefan Achatz <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
When picolcd is switched into bootloader mode (for FW flashing) make
sure not to try to dereference NULL-pointers of feature-devices during
unplug/unbind.
This fixes following BUG:
BUG: unable to handle kernel NULL pointer dereference at 00000298
IP: [<f811f56b>] picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd]
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: hid_picolcd syscopyarea sysfillrect sysimgblt fb_sys_fops
CPU: 0 PID: 15 Comm: khubd Not tainted 3.11.0-rc7-00002-g50d62d4 #2
EIP: 0060:[<f811f56b>] EFLAGS: 00010292 CPU: 0
EIP is at picolcd_exit_framebuffer+0x1b/0x80 [hid_picolcd]
Call Trace:
[<f811d1ab>] picolcd_remove+0xcb/0x120 [hid_picolcd]
[<c1469b09>] hid_device_remove+0x59/0xc0
[<c13464ca>] __device_release_driver+0x5a/0xb0
[<c134653f>] device_release_driver+0x1f/0x30
[<c134603d>] bus_remove_device+0x9d/0xd0
[<c13439a5>] device_del+0xd5/0x150
[<c14696a4>] hid_destroy_device+0x24/0x60
[<c1474cbb>] usbhid_disconnect+0x1b/0x40
...
Signed-off-by: Bruno Prémont <[email protected]>
Cc: [email protected]
Signed-off-by: Jiri Kosina <[email protected]>
|
|
The DuoSense touchscreen device causes a 10 second timeout. This fix
removes the delay.
Signed-off-by: Vasily Titskiy <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
For simple device node creation, add the devname module alias.
Signed-off-by: Marcel Holtmann <[email protected]>
Reviewed-by: David Herrmann <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|
|
Intel LPSS devices that are enumerated from ACPI have both MMIO and IRQ
resources returned in their _CRS method. However, Apple Macbook Air with
Haswell has LPSS devices enumerated from PCI bus instead and _CRS method
returns only an interrupt number (but the device has _HID set that causes
the scan handler to match it).
The current ACPI / LPSS code sets pdata->dev_desc only when MMIO resource
is found for the device and in case of Macbook Air it is never found. That
leads to a NULL pointer dereference in register_device_clock().
Correct this by always setting the pdata->dev_desc.
Reported-and-tested-by: Imre Kaloz <[email protected]>
Signed-off-by: Mika Westerberg <[email protected]>
Cc: 3.10+ <[email protected]> # 3.10+
Signed-off-by: Rafael J. Wysocki <[email protected]>
|
|
via-rng currently isn't auto-loaded if built as a module.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Each call to the co-processor, with exception of the last call, needs to
send data that is multiple of block size. As consequence, any remaining
data is kept in the internal NX context.
This patch fixes a bug in the driver that causes it to save incorrect
data into the context when data is bigger than the block size.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
The NX CGM implementation doesn't support zero length messages and the
current implementation has two flaws:
- When the input data length is zero, it ignores the associated data.
- Even when both lengths are zero, it uses the Crypto API to encrypt a
zeroed block using ctr(aes) and because of this it allocates a new
transformation and sets the key for this new tfm. Both operations are
intended to be used only in user context, while the cryptographic
operations can be called in both user and softirq contexts.
This patch replaces the nested Crypto API use and adds two special
cases:
- When input data and associated data lengths are zero: it uses NX ECB
mode to emulate the encryption of a zeroed block using ctr(aes).
- When input data is zero and associated data is available: it uses NX
GMAC mode to calculate the associated data MAC.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
The NX XCBC implementation doesn't support zero length messages and
because of that NX is currently returning a hard-coded hash for zero
length messages. However this approach is incorrect since the hash value
also depends on which key is used.
This patch removes the hard-coded hash and replace it with an
implementation based on the RFC 3566 using ECB.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the NX driver to perform several hyper calls when necessary
so that the length limits of scatter/gather lists are respected.
Reviewed-by: Marcelo Cerri <[email protected]>
Signed-off-by: Joy Latten <[email protected]>
Signed-off-by: Fionnuala Gunter <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the NX driver to perform several hyper calls when necessary
so that the length limits of scatter/gather lists are respected.
Reviewed-by: Joy Latten <[email protected]>
Reviewed-by: Marcelo Cerri <[email protected]>
Signed-off-by: Fionnuala Gunter <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the nx-aes-gcm implementation to perform several
hyper calls if needed in order to always respect the length limits for
scatter/gather lists.
Two different limits are considered:
- "ibm,max-sg-len": maximum number of bytes of each scatter/gather
list.
- "ibm,max-sync-cop":
- The total number of bytes that a scatter/gather list can hold.
- The maximum number of elements that a scatter/gather list can have.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the nx-aes-ctr implementation to perform several
hyper calls if needed in order to always respect the length limits for
scatter/gather lists.
Two different limits are considered:
- "ibm,max-sg-len": maximum number of bytes of each scatter/gather
list.
- "ibm,max-sync-cop":
- The total number of bytes that a scatter/gather list can hold.
- The maximum number of elements that a scatter/gather list can have.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the nx-aes-cbc implementation to perform several
hyper calls if needed in order to always respect the length limits for
scatter/gather lists.
Two different limits are considered:
- "ibm,max-sg-len": maximum number of bytes of each scatter/gather
list.
- "ibm,max-sync-cop":
- The total number of bytes that a scatter/gather list can hold.
- The maximum number of elements that a scatter/gather list can have.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch updates the nx-aes-ecb implementation to perform several
hyper calls if needed in order to always respect the length limits for
scatter/gather lists.
Two different limits are considered:
- "ibm,max-sg-len": maximum number of bytes of each scatter/gather
list.
- "ibm,max-sync-cop":
- The total number of bytes that a scatter/gather list can hold.
- The maximum number of elements that a scatter/gather list can have.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
This patch includes one more parameter to nx_build_sg_lists() to skip
the given number of bytes from beginning of each sg list.
This is needed in order to implement the fixes for the AES modes to make
them able to process larger chunks of data.
Reviewed-by: Joy Latten <[email protected]>
Signed-off-by: Marcelo Cerri <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
|
|
Error handling is on-its-head in this function. After invoking a function we
should examine the return code and return the error value if there was one.
Instead, this function checks for success and goes onto provide functionality
if success was received. Not so bad in a simple function like this, but in
a more complex one this could end up drowning in curly brackets.
Signed-off-by: Lee Jones <[email protected]>
|
|
event name
The AB8500 debugfs driver allocates memory to contain the name of a new sysfs
entry, but fails to apply the proper post-allocation checks. If the device
were to run out of memory, the allocation would return NULL. Without the
correct checks the driver will continue to populate address NULL with the
specified device name which would obviously cause a pointer dereference Oops.
Signed-off-by: Lee Jones <[email protected]>
|
|
The AB8500 debugfs driver allocates memory for a new sysfs entry, but
fails to apply the proper post-allocation checks. If the device were to
run out of memory, the allocation would return NULL. Without the correct
checks the driver will continue to populate NULL->[show|store|...],
which would obviously cause a pointer dereference Oops.
Signed-off-by: Lee Jones <[email protected]>
|
|
module_pci_driver removes some boilerplate and makes the code
simple.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
break after goto is unreachable. Delete it.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Local variables referenced only in this file are made static.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Local variables referenced only in this file are made static.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
clk_mgt is used only in this file. Make it static.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
Silences the following warning:
drivers/mfd/db8500-prcmu.c:2322:25: warning:
non-ANSI function declaration of function 'prcmu_ac_sleep_req'
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
usbhs_driver_name is used only in this file. Make it static.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
|
|
User pass platform data to device, and platform data may be
NULL. Add the check for pdata.
Signed-off-by: Chao Xie <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
User pass platform data to device, and platform data may be
NULL. Add the check for pdata.
Signed-off-by: Chao Xie <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
|
|
Rather then open coding a cache of the vibra control registers use the
regmap cache code. Also cache the interrupt mask register, providing
a small performance improvement for the interrupt code.
Signed-off-by: Mark Brown <[email protected]>
Acked-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
This will be used to support refactoring of the ASoC CODEC driver to use
a regmap.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
These functions are not referenced anywhere, nor prototyped, so just
remove them.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Sparse report the following warnings:
drivers/dma/imx-sdma.c:330:25: warning: symbol 'sdma_imx31' was not declared. Should it be static?
drivers/dma/imx-sdma.c:351:25: warning: symbol 'sdma_imx25' was not declared. Should it be static?
drivers/dma/imx-sdma.c:357:25: warning: symbol 'sdma_imx35' was not declared. Should it be static?
drivers/dma/imx-sdma.c:375:25: warning: symbol 'sdma_imx51' was not declared. Should it be static?
drivers/dma/imx-sdma.c:395:25: warning: symbol 'sdma_imx53' was not declared. Should it be static?
drivers/dma/imx-sdma.c:414:25: warning: symbol 'sdma_imx6q' was not declared. Should it be static?
Make the sdma_driver_data structures static.
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
pch_dma currently isn't auto-loaded if built as a module.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Many audio interface drivers require support of cyclic transfers to work
correctly, for example Samsung ASoC DMA driver. This patch adds support
for cyclic transfers to the amba-pl08x driver.
Signed-off-by: Alban Bedel <[email protected]>
[tfiga: Rebase and slightly beautify the original patch.]
Signed-off-by: Tomasz Figa <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
There are more fields than just SWIDTH in CH_CONTROL register, so read
register value must be masked in addition to shifting.
Signed-off-by: Alban Bedel <[email protected]>
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
PL080S has separate register to store transfer size in, allowing single
transfer to be much larger than in standard PL080.
This patch makes the amba-pl08x driver aware of this and removes writing
transfer size to reserved bits of CH_CONTROL register on PL080S, which
was not a problem witn transfer sizes fitting the original bitfield
of PL080, but now would overwrite other fields.
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
PL080S is a modified version of PL080 that can be found on Samsung SoCs,
such as S3C6400 and S3C6410.
It has different offset of CONFIG register, separate CONTROL1 register
that holds transfer size and larger maximum transfer size.
Signed-off-by: Tomasz Figa <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
This patch refactors debugging code that dumps LLI entries by moving it
into separate function, which is stubbed when VERBOSE_DEBUG is not
selected. This allows us to get rid of the ugly ifdef from the body of
pl08x_fill_llis_for_desc().
No functional change is introduced by this patch.
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Currently memory allocated for LLIs is casted to an array of structs,
which is fragile and also limits the driver to a single, predefined LLI
layout, while there are some variants of PL08x, which have more fields
in LLI (namely PL080S with its extra CCTL2).
This patch makes LLIs a sequence of 32-bit words, which is just filled
with appropriate values in appropriate order and padded with required
amount of dummy words (currently zero, but PL080S will make better use
of this).
Suggested-by: Linus Walleij <[email protected]>
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|
|
Some variants of PL08x (namely PL080S, found in Samsung S3C64xx SoCs)
have CONFIG register at different offset. This patch makes the driver
use offset from vendor data struct.
Signed-off-by: Tomasz Figa <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
|