diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2014-11-19 10:28:21 -0500 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2014-11-22 03:28:39 -0500 |
commit | dbc98635e0d42f0e62ea92813df1e0e4c90f8375 (patch) | |
tree | bbcc8edc595522f6f42c418ff8a3fcb3b36606fa /include/linux/phy | |
parent | 61211b1bda0321803fdedc61158c55eab2685ad6 (diff) |
phy: remove the old lookup method
The users of the old method are now converted to the new one.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
[ kishon@ti.com : made phy-berlin-usb.c and phy-miphy28lp.c to use the updated
devm_phy_create API.]
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'include/linux/phy')
-rw-r--r-- | include/linux/phy/phy.h | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 849284e5873f..a0197fa1b116 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h | |||
@@ -61,7 +61,6 @@ struct phy { | |||
61 | struct device dev; | 61 | struct device dev; |
62 | int id; | 62 | int id; |
63 | const struct phy_ops *ops; | 63 | const struct phy_ops *ops; |
64 | struct phy_init_data *init_data; | ||
65 | struct mutex mutex; | 64 | struct mutex mutex; |
66 | int init_count; | 65 | int init_count; |
67 | int power_count; | 66 | int power_count; |
@@ -84,32 +83,6 @@ struct phy_provider { | |||
84 | struct of_phandle_args *args); | 83 | struct of_phandle_args *args); |
85 | }; | 84 | }; |
86 | 85 | ||
87 | /** | ||
88 | * struct phy_consumer - represents the phy consumer | ||
89 | * @dev_name: the device name of the controller that will use this PHY device | ||
90 | * @port: name given to the consumer port | ||
91 | */ | ||
92 | struct phy_consumer { | ||
93 | const char *dev_name; | ||
94 | const char *port; | ||
95 | }; | ||
96 | |||
97 | /** | ||
98 | * struct phy_init_data - contains the list of PHY consumers | ||
99 | * @num_consumers: number of consumers for this PHY device | ||
100 | * @consumers: list of PHY consumers | ||
101 | */ | ||
102 | struct phy_init_data { | ||
103 | unsigned int num_consumers; | ||
104 | struct phy_consumer *consumers; | ||
105 | }; | ||
106 | |||
107 | #define PHY_CONSUMER(_dev_name, _port) \ | ||
108 | { \ | ||
109 | .dev_name = _dev_name, \ | ||
110 | .port = _port, \ | ||
111 | } | ||
112 | |||
113 | struct phy_lookup { | 86 | struct phy_lookup { |
114 | struct list_head node; | 87 | struct list_head node; |
115 | const char *dev_id; | 88 | const char *dev_id; |
@@ -166,10 +139,9 @@ struct phy *of_phy_get(struct device_node *np, const char *con_id); | |||
166 | struct phy *of_phy_simple_xlate(struct device *dev, | 139 | struct phy *of_phy_simple_xlate(struct device *dev, |
167 | struct of_phandle_args *args); | 140 | struct of_phandle_args *args); |
168 | struct phy *phy_create(struct device *dev, struct device_node *node, | 141 | struct phy *phy_create(struct device *dev, struct device_node *node, |
169 | const struct phy_ops *ops, | 142 | const struct phy_ops *ops); |
170 | struct phy_init_data *init_data); | ||
171 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, | 143 | struct phy *devm_phy_create(struct device *dev, struct device_node *node, |
172 | const struct phy_ops *ops, struct phy_init_data *init_data); | 144 | const struct phy_ops *ops); |
173 | void phy_destroy(struct phy *phy); | 145 | void phy_destroy(struct phy *phy); |
174 | void devm_phy_destroy(struct device *dev, struct phy *phy); | 146 | void devm_phy_destroy(struct device *dev, struct phy *phy); |
175 | struct phy_provider *__of_phy_provider_register(struct device *dev, | 147 | struct phy_provider *__of_phy_provider_register(struct device *dev, |
@@ -310,16 +282,14 @@ static inline struct phy *of_phy_simple_xlate(struct device *dev, | |||
310 | 282 | ||
311 | static inline struct phy *phy_create(struct device *dev, | 283 | static inline struct phy *phy_create(struct device *dev, |
312 | struct device_node *node, | 284 | struct device_node *node, |
313 | const struct phy_ops *ops, | 285 | const struct phy_ops *ops) |
314 | struct phy_init_data *init_data) | ||
315 | { | 286 | { |
316 | return ERR_PTR(-ENOSYS); | 287 | return ERR_PTR(-ENOSYS); |
317 | } | 288 | } |
318 | 289 | ||
319 | static inline struct phy *devm_phy_create(struct device *dev, | 290 | static inline struct phy *devm_phy_create(struct device *dev, |
320 | struct device_node *node, | 291 | struct device_node *node, |
321 | const struct phy_ops *ops, | 292 | const struct phy_ops *ops) |
322 | struct phy_init_data *init_data) | ||
323 | { | 293 | { |
324 | return ERR_PTR(-ENOSYS); | 294 | return ERR_PTR(-ENOSYS); |
325 | } | 295 | } |