aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/phy/phy.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e2f5ca96cddc..2760744cb2a7 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -174,21 +174,29 @@ void devm_of_phy_provider_unregister(struct device *dev,
174#else 174#else
175static inline int phy_pm_runtime_get(struct phy *phy) 175static inline int phy_pm_runtime_get(struct phy *phy)
176{ 176{
177 if (!phy)
178 return 0;
177 return -ENOSYS; 179 return -ENOSYS;
178} 180}
179 181
180static inline int phy_pm_runtime_get_sync(struct phy *phy) 182static inline int phy_pm_runtime_get_sync(struct phy *phy)
181{ 183{
184 if (!phy)
185 return 0;
182 return -ENOSYS; 186 return -ENOSYS;
183} 187}
184 188
185static inline int phy_pm_runtime_put(struct phy *phy) 189static inline int phy_pm_runtime_put(struct phy *phy)
186{ 190{
191 if (!phy)
192 return 0;
187 return -ENOSYS; 193 return -ENOSYS;
188} 194}
189 195
190static inline int phy_pm_runtime_put_sync(struct phy *phy) 196static inline int phy_pm_runtime_put_sync(struct phy *phy)
191{ 197{
198 if (!phy)
199 return 0;
192 return -ENOSYS; 200 return -ENOSYS;
193} 201}
194 202
@@ -204,21 +212,29 @@ static inline void phy_pm_runtime_forbid(struct phy *phy)
204 212
205static inline int phy_init(struct phy *phy) 213static inline int phy_init(struct phy *phy)
206{ 214{
215 if (!phy)
216 return 0;
207 return -ENOSYS; 217 return -ENOSYS;
208} 218}
209 219
210static inline int phy_exit(struct phy *phy) 220static inline int phy_exit(struct phy *phy)
211{ 221{
222 if (!phy)
223 return 0;
212 return -ENOSYS; 224 return -ENOSYS;
213} 225}
214 226
215static inline int phy_power_on(struct phy *phy) 227static inline int phy_power_on(struct phy *phy)
216{ 228{
229 if (!phy)
230 return 0;
217 return -ENOSYS; 231 return -ENOSYS;
218} 232}
219 233
220static inline int phy_power_off(struct phy *phy) 234static inline int phy_power_off(struct phy *phy)
221{ 235{
236 if (!phy)
237 return 0;
222 return -ENOSYS; 238 return -ENOSYS;
223} 239}
224 240