net: ipa: use IPA power device pointer
authorAlex Elder <elder@linaro.org>
Wed, 9 Mar 2022 19:20:37 +0000 (13:20 -0600)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Mar 2022 05:19:07 +0000 (21:19 -0800)
The ipa_power structure contains a copy of the IPA device pointer,
so there's no need to pass it to ipa_interconnect_init().  We can
also use that pointer for an error message in ipa_power_enable().

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ipa/ipa_power.c

index 8a564d7..16ece27 100644 (file)
@@ -71,7 +71,7 @@ struct ipa_power {
 };
 
 /* Initialize interconnects required for IPA operation */
-static int ipa_interconnect_init(struct ipa_power *power, struct device *dev,
+static int ipa_interconnect_init(struct ipa_power *power,
                                 const struct ipa_interconnect_data *data)
 {
        struct icc_bulk_data *interconnect;
@@ -89,7 +89,7 @@ static int ipa_interconnect_init(struct ipa_power *power, struct device *dev,
                interconnect++;
        }
 
-       ret = of_icc_bulk_get(dev, power->interconnect_count,
+       ret = of_icc_bulk_get(power->dev, power->interconnect_count,
                              power->interconnect);
        if (ret)
                return ret;
@@ -123,7 +123,7 @@ static int ipa_power_enable(struct ipa *ipa)
 
        ret = clk_prepare_enable(power->core);
        if (ret) {
-               dev_err(&ipa->pdev->dev, "error %d enabling core clock\n", ret);
+               dev_err(power->dev, "error %d enabling core clock\n", ret);
                icc_bulk_disable(power->interconnect_count,
                                 power->interconnect);
        }
@@ -385,7 +385,7 @@ ipa_power_init(struct device *dev, const struct ipa_power_data *data)
        spin_lock_init(&power->spinlock);
        power->interconnect_count = data->interconnect_count;
 
-       ret = ipa_interconnect_init(power, dev, data->interconnect_data);
+       ret = ipa_interconnect_init(power, data->interconnect_data);
        if (ret)
                goto err_kfree;