aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-sh-sci.c
AgeCommit message (Collapse)AuthorFilesLines
2018-08-01spi: add flags parameter to txrx_word function pointersLorenzo Bianconi1-8/+12
Add the capability to specify the flag parameter used in bitbang_txrx_be_cpha{0,1} through the txrx_word function pointers of spi_bitbang data structure. That feature will be used to add spi-3wire support to the spi-gpio controller Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-10-20spi: drop owner assignment from platform_driversWolfram Sang1-1/+0
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <[email protected]>
2014-06-17spi: sh-sci: fix use-after-free in sh_sci_spi_remove()Jürg Billeter1-2/+2
setbits() uses sp->membase. Signed-off-by: Jürg Billeter <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-04-14spi: Remove unneeded include of linux/workqueue.hAxel Lin1-1/+0
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-30Merge remote-tracking branches 'spi/topic/s3c64xx', 'spi/topic/sc18is602', ↵Mark Brown1-1/+6
'spi/topic/sh-hspi', 'spi/topic/sh-msiof', 'spi/topic/sh-sci', 'spi/topic/sirf' and 'spi/topic/spidev' into spi-next
2014-03-13spi: sh-sci: Prevent NULL pointer dereferenceAxel Lin1-1/+6
If sp->info is NULL, we will hit NULL pointer dereference in probe() while setting bus_num and num_chipselect for master: sp->bitbang.master->bus_num = sp->info->bus_num; sp->bitbang.master->num_chipselect = sp->info->num_chipselect; Thus add NULL test for sp->info in probe() to prevent NULL pointer dereference. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-02-03spi: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-09-17spi: bitbang: Let spi_bitbang_start() take a reference to masterAxel Lin1-1/+1
Many drivers that use bitbang library have a leak on probe error paths. This is because once a spi_master_get() call succeeds, we need an additional spi_master_put() call to free the memory. Fix this issue by moving the code taking a reference to master to spi_bitbang_start(), so spi_bitbang_start() will take a reference to master on success. With this change, the caller is responsible for calling spi_bitbang_stop() to decrement the reference and spi_master_put() as counterpart of spi_alloc_master() to prevent a memory leak. So now we have below patten for drivers using bitbang library: probe: spi_alloc_master -> Init reference count to 1 spi_bitbang_start -> Increment reference count remove: spi_bitbang_stop -> Decrement reference count spi_master_put -> Decrement reference count (reference count reaches 0) Fixup all users accordingly. Signed-off-by: Axel Lin <[email protected]> Suggested-by: Uwe Kleine-Koenig <[email protected]> Acked-by: Uwe Kleine-Koenig <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-08-29spi: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2011-10-31spi: Add module.h to implicit users in drivers/spiPaul Gortmaker1-0/+1
We are clipping down the presence of module.h, since it was everywhere. If you really need it, you better call it out, as per this changeset. Signed-off-by: Paul Gortmaker <[email protected]>
2011-10-25drivercore: Add helper macro for platform_driver boilerplateGrant Likely1-12/+1
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: Grant Likely <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Magnus Damm <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Stephen Boyd <[email protected]>
2011-06-06spi: reorganize driversGrant Likely1-0/+205
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by: Grant Likely <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Linus Walleij <[email protected]>