diff options
| -rw-r--r-- | drivers/spi/spi-txx9.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c index 637cce2b8bdd..b206de1616d5 100644 --- a/drivers/spi/spi-txx9.c +++ b/drivers/spi/spi-txx9.c | |||
| @@ -348,7 +348,7 @@ static int txx9spi_probe(struct platform_device *dev) | |||
| 348 | INIT_LIST_HEAD(&c->queue); | 348 | INIT_LIST_HEAD(&c->queue); |
| 349 | init_waitqueue_head(&c->waitq); | 349 | init_waitqueue_head(&c->waitq); |
| 350 | 350 | ||
| 351 | c->clk = clk_get(&dev->dev, "spi-baseclk"); | 351 | c->clk = devm_clk_get(&dev->dev, "spi-baseclk"); |
| 352 | if (IS_ERR(c->clk)) { | 352 | if (IS_ERR(c->clk)) { |
| 353 | ret = PTR_ERR(c->clk); | 353 | ret = PTR_ERR(c->clk); |
| 354 | c->clk = NULL; | 354 | c->clk = NULL; |
| @@ -415,10 +415,8 @@ exit_busy: | |||
| 415 | exit: | 415 | exit: |
| 416 | if (c->workqueue) | 416 | if (c->workqueue) |
| 417 | destroy_workqueue(c->workqueue); | 417 | destroy_workqueue(c->workqueue); |
| 418 | if (c->clk) { | 418 | if (c->clk) |
| 419 | clk_disable(c->clk); | 419 | clk_disable(c->clk); |
| 420 | clk_put(c->clk); | ||
| 421 | } | ||
| 422 | spi_master_put(master); | 420 | spi_master_put(master); |
| 423 | return ret; | 421 | return ret; |
| 424 | } | 422 | } |
| @@ -430,7 +428,6 @@ static int txx9spi_remove(struct platform_device *dev) | |||
| 430 | 428 | ||
| 431 | destroy_workqueue(c->workqueue); | 429 | destroy_workqueue(c->workqueue); |
| 432 | clk_disable(c->clk); | 430 | clk_disable(c->clk); |
| 433 | clk_put(c->clk); | ||
| 434 | return 0; | 431 | return 0; |
| 435 | } | 432 | } |
| 436 | 433 | ||
