Skip to content

Commit 54a8cd0

Browse files
joehattoriandersson
authored andcommitted
soc: qcom: ice: Remove the device_link field in qcom_ice
The struct device_link *link field in struct qcom_ice is only used to store the result of a device_link_add call with the DL_FLAG_AUTOREMOVE_SUPPLIER flag. With this flag, the resulting value can only be used to check whether the link is present or not, as per the device_link_add description, hence this commit removes the field. Signed-off-by: Joe Hattori <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 98e5b7f commit 54a8cd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/soc/qcom/ice.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
struct qcom_ice {
4545
struct device *dev;
4646
void __iomem *base;
47-
struct device_link *link;
4847

4948
struct clk *core_clk;
5049
};
@@ -268,6 +267,7 @@ struct qcom_ice *of_qcom_ice_get(struct device *dev)
268267
struct qcom_ice *ice;
269268
struct resource *res;
270269
void __iomem *base;
270+
struct device_link *link;
271271

272272
if (!dev || !dev->of_node)
273273
return ERR_PTR(-ENODEV);
@@ -311,8 +311,8 @@ struct qcom_ice *of_qcom_ice_get(struct device *dev)
311311
return ERR_PTR(-EPROBE_DEFER);
312312
}
313313

314-
ice->link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
315-
if (!ice->link) {
314+
link = device_link_add(dev, &pdev->dev, DL_FLAG_AUTOREMOVE_SUPPLIER);
315+
if (!link) {
316316
dev_err(&pdev->dev,
317317
"Failed to create device link to consumer %s\n",
318318
dev_name(dev));

0 commit comments

Comments
 (0)