diff options
Diffstat (limited to 'drivers/spi/spi-bcm63xx.c')
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 3686d78c44a6..9aecb77c3d89 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -157,16 +157,6 @@ static inline u8 bcm_spi_readb(struct bcm63xx_spi *bs, return readb(bs->regs + bs->reg_offsets[offset]); } -static inline u16 bcm_spi_readw(struct bcm63xx_spi *bs, - unsigned int offset) -{ -#ifdef CONFIG_CPU_BIG_ENDIAN - return ioread16be(bs->regs + bs->reg_offsets[offset]); -#else - return readw(bs->regs + bs->reg_offsets[offset]); -#endif -} - static inline void bcm_spi_writeb(struct bcm63xx_spi *bs, u8 value, unsigned int offset) { @@ -292,7 +282,7 @@ static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *first, /* Issue the transfer */ cmd = SPI_CMD_START_IMMEDIATE; cmd |= (prepend_len << SPI_CMD_PREPEND_BYTE_CNT_SHIFT); - cmd |= (spi->chip_select << SPI_CMD_DEVICE_ID_SHIFT); + cmd |= (spi_get_chipselect(spi, 0) << SPI_CMD_DEVICE_ID_SHIFT); bcm_spi_writew(bs, cmd, SPI_CMD); /* Enable the CMD_DONE interrupt */ @@ -615,7 +605,7 @@ out_err: return ret; } -static int bcm63xx_spi_remove(struct platform_device *pdev) +static void bcm63xx_spi_remove(struct platform_device *pdev) { struct spi_master *master = platform_get_drvdata(pdev); struct bcm63xx_spi *bs = spi_master_get_devdata(master); @@ -625,11 +615,8 @@ static int bcm63xx_spi_remove(struct platform_device *pdev) /* HW shutdown */ clk_disable_unprepare(bs->clk); - - return 0; } -#ifdef CONFIG_PM_SLEEP static int bcm63xx_spi_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); @@ -656,11 +643,8 @@ static int bcm63xx_spi_resume(struct device *dev) return 0; } -#endif -static const struct dev_pm_ops bcm63xx_spi_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(bcm63xx_spi_suspend, bcm63xx_spi_resume) -}; +static DEFINE_SIMPLE_DEV_PM_OPS(bcm63xx_spi_pm_ops, bcm63xx_spi_suspend, bcm63xx_spi_resume); static struct platform_driver bcm63xx_spi_driver = { .driver = { @@ -670,7 +654,7 @@ static struct platform_driver bcm63xx_spi_driver = { }, .id_table = bcm63xx_spi_dev_match, .probe = bcm63xx_spi_probe, - .remove = bcm63xx_spi_remove, + .remove_new = bcm63xx_spi_remove, }; module_platform_driver(bcm63xx_spi_driver); |