aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>2018-08-22 08:13:01 -0400
committerTejun Heo <tj@kernel.org>2018-08-22 11:08:27 -0400
commit16af2d65842d343c2f95733c3993a0b5baab08f9 (patch)
tree09a11625e52789d5a5424c7b63e5a55a7df9033e
parenta69508c2847d26869e85daadc9f74abaf1253a52 (diff)
ata: add an extra argument to ahci_platform_get_resources()
Add an extra argument to ahci_platform_get_resources(), that is for the bitmap representing the resource to get in this function. Currently there is no resources to be defined, so all the callers set '0' to the argument. Suggested-by: Hans de Goede <hdegoede@redhat.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r--drivers/ata/ahci_brcm.c2
-rw-r--r--drivers/ata/ahci_ceva.c2
-rw-r--r--drivers/ata/ahci_da850.c2
-rw-r--r--drivers/ata/ahci_dm816.c2
-rw-r--r--drivers/ata/ahci_imx.c2
-rw-r--r--drivers/ata/ahci_mtk.c2
-rw-r--r--drivers/ata/ahci_mvebu.c2
-rw-r--r--drivers/ata/ahci_platform.c2
-rw-r--r--drivers/ata/ahci_qoriq.c2
-rw-r--r--drivers/ata/ahci_seattle.c2
-rw-r--r--drivers/ata/ahci_st.c2
-rw-r--r--drivers/ata/ahci_sunxi.c2
-rw-r--r--drivers/ata/ahci_tegra.c2
-rw-r--r--drivers/ata/ahci_xgene.c2
-rw-r--r--drivers/ata/libahci_platform.c4
-rw-r--r--include/linux/ahci_platform.h2
16 files changed, 18 insertions, 16 deletions
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index ea430819c80b..f3d557777d82 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -425,7 +425,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
425 425
426 brcm_sata_phys_enable(priv); 426 brcm_sata_phys_enable(priv);
427 427
428 hpriv = ahci_platform_get_resources(pdev); 428 hpriv = ahci_platform_get_resources(pdev, 0);
429 if (IS_ERR(hpriv)) 429 if (IS_ERR(hpriv))
430 return PTR_ERR(hpriv); 430 return PTR_ERR(hpriv);
431 hpriv->plat_data = priv; 431 hpriv->plat_data = priv;
diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index 5ecc9d46cb54..dc78c98cb9f1 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -213,7 +213,7 @@ static int ceva_ahci_probe(struct platform_device *pdev)
213 213
214 cevapriv->ahci_pdev = pdev; 214 cevapriv->ahci_pdev = pdev;
215 215
216 hpriv = ahci_platform_get_resources(pdev); 216 hpriv = ahci_platform_get_resources(pdev, 0);
217 if (IS_ERR(hpriv)) 217 if (IS_ERR(hpriv))
218 return PTR_ERR(hpriv); 218 return PTR_ERR(hpriv);
219 219
diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c
index 9b34dff64536..ebaa657f28c4 100644
--- a/drivers/ata/ahci_da850.c
+++ b/drivers/ata/ahci_da850.c
@@ -171,7 +171,7 @@ static int ahci_da850_probe(struct platform_device *pdev)
171 u32 mpy; 171 u32 mpy;
172 int rc; 172 int rc;
173 173
174 hpriv = ahci_platform_get_resources(pdev); 174 hpriv = ahci_platform_get_resources(pdev, 0);
175 if (IS_ERR(hpriv)) 175 if (IS_ERR(hpriv))
176 return PTR_ERR(hpriv); 176 return PTR_ERR(hpriv);
177 177
diff --git a/drivers/ata/ahci_dm816.c b/drivers/ata/ahci_dm816.c
index fbd827c3a75c..89509c3efb01 100644
--- a/drivers/ata/ahci_dm816.c
+++ b/drivers/ata/ahci_dm816.c
@@ -148,7 +148,7 @@ static int ahci_dm816_probe(struct platform_device *pdev)
148 struct ahci_host_priv *hpriv; 148 struct ahci_host_priv *hpriv;
149 int rc; 149 int rc;
150 150
151 hpriv = ahci_platform_get_resources(pdev); 151 hpriv = ahci_platform_get_resources(pdev, 0);
152 if (IS_ERR(hpriv)) 152 if (IS_ERR(hpriv))
153 return PTR_ERR(hpriv); 153 return PTR_ERR(hpriv);
154 154
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 6822e2f33f7e..b00799d208f5 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -1127,7 +1127,7 @@ static int imx_ahci_probe(struct platform_device *pdev)
1127 return ret; 1127 return ret;
1128 } 1128 }
1129 1129
1130 hpriv = ahci_platform_get_resources(pdev); 1130 hpriv = ahci_platform_get_resources(pdev, 0);
1131 if (IS_ERR(hpriv)) 1131 if (IS_ERR(hpriv))
1132 return PTR_ERR(hpriv); 1132 return PTR_ERR(hpriv);
1133 1133
diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c
index 0ae6971c2a4c..8bc1a26ffc31 100644
--- a/drivers/ata/ahci_mtk.c
+++ b/drivers/ata/ahci_mtk.c
@@ -142,7 +142,7 @@ static int mtk_ahci_probe(struct platform_device *pdev)
142 if (!plat) 142 if (!plat)
143 return -ENOMEM; 143 return -ENOMEM;
144 144
145 hpriv = ahci_platform_get_resources(pdev); 145 hpriv = ahci_platform_get_resources(pdev, 0);
146 if (IS_ERR(hpriv)) 146 if (IS_ERR(hpriv))
147 return PTR_ERR(hpriv); 147 return PTR_ERR(hpriv);
148 148
diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 0045dacd814b..adbe38fb9c35 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -158,7 +158,7 @@ static int ahci_mvebu_probe(struct platform_device *pdev)
158 const struct mbus_dram_target_info *dram; 158 const struct mbus_dram_target_info *dram;
159 int rc; 159 int rc;
160 160
161 hpriv = ahci_platform_get_resources(pdev); 161 hpriv = ahci_platform_get_resources(pdev, 0);
162 if (IS_ERR(hpriv)) 162 if (IS_ERR(hpriv))
163 return PTR_ERR(hpriv); 163 return PTR_ERR(hpriv);
164 164
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 99f9a895a459..570927316962 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -43,7 +43,7 @@ static int ahci_probe(struct platform_device *pdev)
43 struct ahci_host_priv *hpriv; 43 struct ahci_host_priv *hpriv;
44 int rc; 44 int rc;
45 45
46 hpriv = ahci_platform_get_resources(pdev); 46 hpriv = ahci_platform_get_resources(pdev, 0);
47 if (IS_ERR(hpriv)) 47 if (IS_ERR(hpriv))
48 return PTR_ERR(hpriv); 48 return PTR_ERR(hpriv);
49 49
diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index cfdef4d44ae9..ce59253ec158 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -250,7 +250,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev)
250 struct resource *res; 250 struct resource *res;
251 int rc; 251 int rc;
252 252
253 hpriv = ahci_platform_get_resources(pdev); 253 hpriv = ahci_platform_get_resources(pdev, 0);
254 if (IS_ERR(hpriv)) 254 if (IS_ERR(hpriv))
255 return PTR_ERR(hpriv); 255 return PTR_ERR(hpriv);
256 256
diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
index 1d31c0c0fc20..e57b6f92c288 100644
--- a/drivers/ata/ahci_seattle.c
+++ b/drivers/ata/ahci_seattle.c
@@ -164,7 +164,7 @@ static int ahci_seattle_probe(struct platform_device *pdev)
164 int rc; 164 int rc;
165 struct ahci_host_priv *hpriv; 165 struct ahci_host_priv *hpriv;
166 166
167 hpriv = ahci_platform_get_resources(pdev); 167 hpriv = ahci_platform_get_resources(pdev, 0);
168 if (IS_ERR(hpriv)) 168 if (IS_ERR(hpriv))
169 return PTR_ERR(hpriv); 169 return PTR_ERR(hpriv);
170 170
diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c
index bc345f249555..21c5c44832ef 100644
--- a/drivers/ata/ahci_st.c
+++ b/drivers/ata/ahci_st.c
@@ -156,7 +156,7 @@ static int st_ahci_probe(struct platform_device *pdev)
156 if (!drv_data) 156 if (!drv_data)
157 return -ENOMEM; 157 return -ENOMEM;
158 158
159 hpriv = ahci_platform_get_resources(pdev); 159 hpriv = ahci_platform_get_resources(pdev, 0);
160 if (IS_ERR(hpriv)) 160 if (IS_ERR(hpriv))
161 return PTR_ERR(hpriv); 161 return PTR_ERR(hpriv);
162 hpriv->plat_data = drv_data; 162 hpriv->plat_data = drv_data;
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index b26437430163..631610b72aa5 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -181,7 +181,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev)
181 struct ahci_host_priv *hpriv; 181 struct ahci_host_priv *hpriv;
182 int rc; 182 int rc;
183 183
184 hpriv = ahci_platform_get_resources(pdev); 184 hpriv = ahci_platform_get_resources(pdev, 0);
185 if (IS_ERR(hpriv)) 185 if (IS_ERR(hpriv))
186 return PTR_ERR(hpriv); 186 return PTR_ERR(hpriv);
187 187
diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index 64d848409fe2..004f2608818e 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -494,7 +494,7 @@ static int tegra_ahci_probe(struct platform_device *pdev)
494 int ret; 494 int ret;
495 unsigned int i; 495 unsigned int i;
496 496
497 hpriv = ahci_platform_get_resources(pdev); 497 hpriv = ahci_platform_get_resources(pdev, 0);
498 if (IS_ERR(hpriv)) 498 if (IS_ERR(hpriv))
499 return PTR_ERR(hpriv); 499 return PTR_ERR(hpriv);
500 500
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index ad58da7c9aff..7e157e1bf65e 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -759,7 +759,7 @@ static int xgene_ahci_probe(struct platform_device *pdev)
759 &xgene_ahci_v2_port_info }; 759 &xgene_ahci_v2_port_info };
760 int rc; 760 int rc;
761 761
762 hpriv = ahci_platform_get_resources(pdev); 762 hpriv = ahci_platform_get_resources(pdev, 0);
763 if (IS_ERR(hpriv)) 763 if (IS_ERR(hpriv))
764 return PTR_ERR(hpriv); 764 return PTR_ERR(hpriv);
765 765
diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 8fbb532b62dd..679f763410c0 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -332,6 +332,7 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port,
332/** 332/**
333 * ahci_platform_get_resources - Get platform resources 333 * ahci_platform_get_resources - Get platform resources
334 * @pdev: platform device to get resources for 334 * @pdev: platform device to get resources for
335 * @flags: bitmap representing the resource to get
335 * 336 *
336 * This function allocates an ahci_host_priv struct, and gets the following 337 * This function allocates an ahci_host_priv struct, and gets the following
337 * resources, storing a reference to them inside the returned struct: 338 * resources, storing a reference to them inside the returned struct:
@@ -345,7 +346,8 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port,
345 * RETURNS: 346 * RETURNS:
346 * The allocated ahci_host_priv on success, otherwise an ERR_PTR value 347 * The allocated ahci_host_priv on success, otherwise an ERR_PTR value
347 */ 348 */
348struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev) 349struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
350 unsigned int flags)
349{ 351{
350 struct device *dev = &pdev->dev; 352 struct device *dev = &pdev->dev;
351 struct ahci_host_priv *hpriv; 353 struct ahci_host_priv *hpriv;
diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h
index 1b0a17b22cd3..6490be1f8a16 100644
--- a/include/linux/ahci_platform.h
+++ b/include/linux/ahci_platform.h
@@ -30,7 +30,7 @@ void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
30int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); 30int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
31void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); 31void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
32struct ahci_host_priv *ahci_platform_get_resources( 32struct ahci_host_priv *ahci_platform_get_resources(
33 struct platform_device *pdev); 33 struct platform_device *pdev, unsigned int flags);
34int ahci_platform_init_host(struct platform_device *pdev, 34int ahci_platform_init_host(struct platform_device *pdev,
35 struct ahci_host_priv *hpriv, 35 struct ahci_host_priv *hpriv,
36 const struct ata_port_info *pi_template, 36 const struct ata_port_info *pi_template,