]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi-clps711x.c
arm: dts: tx6: add some aliases and a label for backlight@0
[karo-tx-linux.git] / drivers / spi / spi-clps711x.c
index 6416798828e72bc9f5194282f55cf49a37f6809c..e2a5a426b2efc57038503ed7b64d00237e190b14 100644 (file)
@@ -226,10 +226,10 @@ static int spi_clps711x_probe(struct platform_device *pdev)
                               dev_name(&pdev->dev), hw);
        if (ret) {
                dev_err(&pdev->dev, "Can't request IRQ\n");
-               goto clk_out;
+               goto err_out;
        }
 
-       ret = spi_register_master(master);
+       ret = devm_spi_register_master(&pdev->dev, master);
        if (!ret) {
                dev_info(&pdev->dev,
                         "SPI bus driver initialized. Master clock %u Hz\n",
@@ -239,7 +239,6 @@ static int spi_clps711x_probe(struct platform_device *pdev)
 
        dev_err(&pdev->dev, "Failed to register master\n");
 
-clk_out:
 err_out:
        while (--i >= 0)
                if (gpio_is_valid(hw->chipselect[i]))
@@ -260,8 +259,6 @@ static int spi_clps711x_remove(struct platform_device *pdev)
                if (gpio_is_valid(hw->chipselect[i]))
                        gpio_free(hw->chipselect[i]);
 
-       spi_unregister_master(master);
-
        return 0;
 }