diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-04-06 07:18:57 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-08 08:42:10 -0400 |
commit | ab300d18175aaae8e4c6f90c0b0577384721dea7 (patch) | |
tree | 72f298b7b1c92c71c8198aa6b0b93db09062d08c | |
parent | 8b0bebe2c821f0bb872da94cc815096dad89850c (diff) |
spi/bcm63xx: remove unused speed_hz variable
speed_hz is a write only member, so we can safely remove it and its
generation. Also fixes the missing clk_put after getting the periph
clock.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | arch/mips/bcm63xx/dev-spi.c | 11 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 1 | ||||
-rw-r--r-- | drivers/spi/spi-bcm63xx.c | 2 |
3 files changed, 0 insertions, 14 deletions
diff --git a/arch/mips/bcm63xx/dev-spi.c b/arch/mips/bcm63xx/dev-spi.c index f1c9c3e2f678..e97fd60e92ef 100644 --- a/arch/mips/bcm63xx/dev-spi.c +++ b/arch/mips/bcm63xx/dev-spi.c | |||
@@ -85,20 +85,9 @@ static struct platform_device bcm63xx_spi_device = { | |||
85 | 85 | ||
86 | int __init bcm63xx_spi_register(void) | 86 | int __init bcm63xx_spi_register(void) |
87 | { | 87 | { |
88 | struct clk *periph_clk; | ||
89 | |||
90 | if (BCMCPU_IS_6328() || BCMCPU_IS_6345()) | 88 | if (BCMCPU_IS_6328() || BCMCPU_IS_6345()) |
91 | return -ENODEV; | 89 | return -ENODEV; |
92 | 90 | ||
93 | periph_clk = clk_get(NULL, "periph"); | ||
94 | if (IS_ERR(periph_clk)) { | ||
95 | pr_err("unable to get periph clock\n"); | ||
96 | return -ENODEV; | ||
97 | } | ||
98 | |||
99 | /* Set bus frequency */ | ||
100 | spi_pdata.speed_hz = clk_get_rate(periph_clk); | ||
101 | |||
102 | spi_resources[0].start = bcm63xx_regset_address(RSET_SPI); | 91 | spi_resources[0].start = bcm63xx_regset_address(RSET_SPI); |
103 | spi_resources[0].end = spi_resources[0].start; | 92 | spi_resources[0].end = spi_resources[0].start; |
104 | spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI); | 93 | spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI); |
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h index c9bae1362606..b0184cf02575 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | |||
@@ -13,7 +13,6 @@ struct bcm63xx_spi_pdata { | |||
13 | unsigned int msg_ctl_width; | 13 | unsigned int msg_ctl_width; |
14 | int bus_num; | 14 | int bus_num; |
15 | int num_chipselect; | 15 | int num_chipselect; |
16 | u32 speed_hz; | ||
17 | }; | 16 | }; |
18 | 17 | ||
19 | enum bcm63xx_regs_spi { | 18 | enum bcm63xx_regs_spi { |
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 973099bd760d..a4ec5f4ec817 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
@@ -46,7 +46,6 @@ struct bcm63xx_spi { | |||
46 | int irq; | 46 | int irq; |
47 | 47 | ||
48 | /* Platform data */ | 48 | /* Platform data */ |
49 | u32 speed_hz; | ||
50 | unsigned fifo_size; | 49 | unsigned fifo_size; |
51 | unsigned int msg_type_shift; | 50 | unsigned int msg_type_shift; |
52 | unsigned int msg_ctl_width; | 51 | unsigned int msg_ctl_width; |
@@ -436,7 +435,6 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) | |||
436 | master->unprepare_transfer_hardware = bcm63xx_spi_unprepare_transfer; | 435 | master->unprepare_transfer_hardware = bcm63xx_spi_unprepare_transfer; |
437 | master->transfer_one_message = bcm63xx_spi_transfer_one; | 436 | master->transfer_one_message = bcm63xx_spi_transfer_one; |
438 | master->mode_bits = MODEBITS; | 437 | master->mode_bits = MODEBITS; |
439 | bs->speed_hz = pdata->speed_hz; | ||
440 | bs->msg_type_shift = pdata->msg_type_shift; | 438 | bs->msg_type_shift = pdata->msg_type_shift; |
441 | bs->msg_ctl_width = pdata->msg_ctl_width; | 439 | bs->msg_ctl_width = pdata->msg_ctl_width; |
442 | bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); | 440 | bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); |