mirror of https://gitee.com/openkylin/linux.git
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;
|
base_phys = res->start;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (!res) {
|
if (irq < 0)
|
||||||
dev_err(&pdev->dev, "no irq resource\n");
|
return irq;
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
irq = res->start;
|
|
||||||
|
|
||||||
div_clk = devm_clk_get(&pdev->dev, "div-clk");
|
div_clk = devm_clk_get(&pdev->dev, "div-clk");
|
||||||
if (IS_ERR(div_clk)) {
|
if (IS_ERR(div_clk)) {
|
||||||
|
|
Loading…
Reference in New Issue