[PATCH] spi: add driver for BCM2835
Jonas Gorski
jogo at openwrt.org
Wed Mar 6 05:55:23 EST 2013
Just a small thing I spotted ...
On 6 March 2013 03:49, Stephen Warren <swarren at wwwdotorg.org> wrote:
> (snip)
> +static int bcm2835_spi_probe(struct platform_device *pdev)
> +{
> (snip some more)
> + /* initialise the hardware */
> + clk_prepare_enable(bs->clk);
vs.
> + bcm2835_wr(bs, BCM2835_SPI_CS,
> + BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
> +
> + err = spi_register_master(master);
> + if (err) {
> + dev_err(&pdev->dev, "could not register SPI master: %d\n", err);
> + goto out_clk_unprepare;
> + }
> +
> + return 0;
> +
> +out_clk_unprepare:
> + clk_unprepare(bs->clk);
You are missing a disable here (the _remove() has it).
> + free_irq(bs->irq, master);
> +out_master_put:
> + spi_master_put(master);
> + return err;
> +}
> +
Jonas
More information about the linux-rpi-kernel
mailing list