spi: Updates for 3.6
Grant is still away so another pull request with some fairly minor fixes, the most notable of which are several fixes for some common error patterns with the reference counting spi_master_get/put do. - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJQLrxzAAoJEFJkBDiqVpZ4xHIP+wQ8wi6X/HkB4I7EA9aET/hO UzyUTZtK6UQGjpqOBK0S38BMweyC23rbeYCcyWgF7rKI7IEjlul1r4O3iChgmeWR 0ksrDfAIajb+9r1VoN7JQXnqk6miIIFdK2rotLNPnpbNlJTFCmmXD2FK5Zfc/pNA e3OjFvtMcaOGjTo5xvN3RK3e2IcH3eKHLCeoj33bKqElT6loITHPnOaEWyIe6QCc ExNCiv+D4apTRZ7nlvrttJrNtoMrL49rMy4rz0Z68nsClf1RZeZlTbVeT9+le3LQ VhrHUeW8TqYYPBuyMgDyCCBmkVlTZCODBaW2ZtXaC32n72luJuDgq3cZBXhCYuKe OPibJSY9j1P9CQBlro6Ccb/3pMjfegaLKCKsSHOdaMF730z9CImT78a2hVgMCNjQ WsUDwsOp8l8iJpgTylD1ijQGhH5h7yfp1TXc8rdeEWsRlI2wovCJtU4G4okvFUID UQFWShim73f6tDE5dzSYhzigg1ikbaOe5CpO3xk1foyNOx/o3/7U7Da0P5t6yVBa zwW/zXdl3GWMLGkqL+oHHMDGLGPeALsgIzMwSMVQY6cK3qROL3fJI9ajk31a1zeP sbWx53G2/AHDOqmvvXbuM/GJ8FOrQx7qJ/A2kLp+Fd+y8j/X15C28qVjQYNCJCXi x/02RXln1MxLrFKVasvn =8RgT -----END PGP SIGNATURE----- Merge tag 'spi-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc Pull spi fixes from Mark Brown: "Grant is still away so another pull request with some fairly minor fixes, the most notable of which are several fixes for some common error patterns with the reference counting spi_master_get/put do." * tag 'spi-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc: spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions spi: spi-coldfire-qspi: Drop extra spi_master_put in device remove function spi/pl022: fix spi-pl022 pm enable at probe spi/bcm63xx: Ensure that memory is freed only after it is no longer used spi: omap2-mcspi: Fix the error handling in probe spi/s3c64xx: Add missing static storage class specifiers
This commit is contained in:
commit
8a6b52140f
@ -438,7 +438,7 @@ out:
|
||||
|
||||
static int __devexit bcm63xx_spi_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct spi_master *master = platform_get_drvdata(pdev);
|
||||
struct spi_master *master = spi_master_get(platform_get_drvdata(pdev));
|
||||
struct bcm63xx_spi *bs = spi_master_get_devdata(master);
|
||||
|
||||
spi_unregister_master(master);
|
||||
@ -452,6 +452,8 @@ static int __devexit bcm63xx_spi_remove(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, 0);
|
||||
|
||||
spi_master_put(master);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,6 @@ static int __devexit mcfqspi_remove(struct platform_device *pdev)
|
||||
iounmap(mcfqspi->iobase);
|
||||
release_mem_region(res->start, resource_size(res));
|
||||
spi_unregister_master(master);
|
||||
spi_master_put(master);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -541,7 +540,7 @@ static int __devexit mcfqspi_remove(struct platform_device *pdev)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int mcfqspi_suspend(struct device *dev)
|
||||
{
|
||||
struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
|
||||
struct spi_master *master = dev_get_drvdata(dev);
|
||||
struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
|
||||
|
||||
spi_master_suspend(master);
|
||||
@ -553,7 +552,7 @@ static int mcfqspi_suspend(struct device *dev)
|
||||
|
||||
static int mcfqspi_resume(struct device *dev)
|
||||
{
|
||||
struct spi_master *master = spi_master_get(dev_get_drvdata(dev));
|
||||
struct spi_master *master = dev_get_drvdata(dev);
|
||||
struct mcfqspi *mcfqspi = spi_master_get_devdata(master);
|
||||
|
||||
spi_master_resume(master);
|
||||
|
@ -1228,18 +1228,16 @@ static int __devinit omap2_mcspi_probe(struct platform_device *pdev)
|
||||
|
||||
status = spi_register_master(master);
|
||||
if (status < 0)
|
||||
goto err_spi_register;
|
||||
goto disable_pm;
|
||||
|
||||
return status;
|
||||
|
||||
err_spi_register:
|
||||
spi_master_put(master);
|
||||
disable_pm:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
dma_chnl_free:
|
||||
kfree(mcspi->dma_channels);
|
||||
free_master:
|
||||
kfree(master);
|
||||
spi_master_put(master);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
return status;
|
||||
}
|
||||
|
@ -2053,7 +2053,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n",
|
||||
adev->res.start, pl022->virtbase);
|
||||
|
||||
pm_runtime_enable(dev);
|
||||
pm_runtime_resume(dev);
|
||||
|
||||
pl022->clk = clk_get(&adev->dev, NULL);
|
||||
|
@ -1479,40 +1479,40 @@ static const struct dev_pm_ops s3c64xx_spi_pm = {
|
||||
s3c64xx_spi_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config s3c2443_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config s3c2443_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x7f },
|
||||
.rx_lvl_offset = 13,
|
||||
.tx_st_done = 21,
|
||||
.high_speed = true,
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config s3c6410_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config s3c6410_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x7f, 0x7F },
|
||||
.rx_lvl_offset = 13,
|
||||
.tx_st_done = 21,
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config s5p64x0_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config s5p64x0_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x1ff, 0x7F },
|
||||
.rx_lvl_offset = 15,
|
||||
.tx_st_done = 25,
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config s5pc100_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config s5pc100_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x7f, 0x7F },
|
||||
.rx_lvl_offset = 13,
|
||||
.tx_st_done = 21,
|
||||
.high_speed = true,
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config s5pv210_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config s5pv210_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x1ff, 0x7F },
|
||||
.rx_lvl_offset = 15,
|
||||
.tx_st_done = 25,
|
||||
.high_speed = true,
|
||||
};
|
||||
|
||||
struct s3c64xx_spi_port_config exynos4_spi_port_config = {
|
||||
static struct s3c64xx_spi_port_config exynos4_spi_port_config = {
|
||||
.fifo_lvl_mask = { 0x1ff, 0x7F, 0x7F },
|
||||
.rx_lvl_offset = 15,
|
||||
.tx_st_done = 25,
|
||||
|
Loading…
Reference in New Issue
Block a user