]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PM / devfreq: tegra30: Change irq type to unsigned int
authorDmitry Osipenko <digetx@gmail.com>
Mon, 4 Nov 2019 21:55:59 +0000 (00:55 +0300)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 6 Nov 2019 03:04:00 +0000 (12:04 +0900)
IRQ numbers are always positive, hence the corresponding variable should
be unsigned to keep types consistent. This is a minor change that cleans
up code a tad more.

Suggested-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/tegra30-devfreq.c

index a6ba75f4106d80456e79b7d226875af24dff2254..a27300f40b0bd7cc0041d9a615a2cc17d53962d4 100644 (file)
@@ -160,7 +160,7 @@ struct tegra_devfreq {
 
        struct tegra_devfreq_device devices[ARRAY_SIZE(actmon_device_configs)];
 
-       int irq;
+       unsigned int            irq;
 };
 
 struct tegra_actmon_emc_ratio {
@@ -618,12 +618,12 @@ static int tegra_devfreq_probe(struct platform_device *pdev)
                return PTR_ERR(tegra->emc_clock);
        }
 
-       tegra->irq = platform_get_irq(pdev, 0);
-       if (tegra->irq < 0) {
-               err = tegra->irq;
+       err = platform_get_irq(pdev, 0);
+       if (err < 0) {
                dev_err(&pdev->dev, "Failed to get IRQ: %d\n", err);
                return err;
        }
+       tegra->irq = err;
 
        reset_control_assert(tegra->reset);