mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
i2c: tegra: Use platform_get_irq()
Use common helper for retrieval of the interrupt number in order to make code cleaner. Note that platform_get_irq() prints error message by itself. Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
f7d62a1185
commit
20b9a6c3ef
@ -1684,12 +1684,9 @@ static int tegra_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
base_phys = res->start;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "no irq resource\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
irq = res->start;
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
div_clk = devm_clk_get(&pdev->dev, "div-clk");
|
||||
if (IS_ERR(div_clk)) {
|
||||
|
Loading…
Reference in New Issue
Block a user