diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2016-07-22 00:03:17 -0400 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2016-09-10 07:18:53 -0400 |
commit | 35872fdcbf5c109dab03fb36ddec35b7bad7d762 (patch) | |
tree | 73af12823cdeaa4cae1b8a67f9766d80464ba6cb /include/linux/extcon.h | |
parent | ceaa98f442cf09dc73946c6402489344367905ae (diff) |
extcon: Rename the extcon_set/get_state() to maintain the function naming pattern
This patch just renames the existing extcon_get/set_cable_state_()
as following because of maintaining the function naming pattern
like as extcon APIs for property.
- extcon_set_cable_state_() -> extcon_set_state()
- extcon_get_cable_state_() -> extcon_get_state()
But, this patch remains the old extcon_set/get_cable_state_() functions
to prevent the build break. After altering new APIs, remove the old APIs.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r-- | include/linux/extcon.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h index f08469089f74..4fa37385c97a 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h | |||
@@ -216,11 +216,11 @@ extern struct extcon_dev *devm_extcon_dev_allocate(struct device *dev, | |||
216 | extern void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev); | 216 | extern void devm_extcon_dev_free(struct device *dev, struct extcon_dev *edev); |
217 | 217 | ||
218 | /* | 218 | /* |
219 | * get/set_cable_state access each bit of the 32b encoded state value. | 219 | * get/set_state access each bit of the 32b encoded state value. |
220 | * They are used to access the status of each cable based on the cable id. | 220 | * They are used to access the status of each cable based on the cable id. |
221 | */ | 221 | */ |
222 | extern int extcon_get_cable_state_(struct extcon_dev *edev, unsigned int id); | 222 | extern int extcon_get_state(struct extcon_dev *edev, unsigned int id); |
223 | extern int extcon_set_cable_state_(struct extcon_dev *edev, unsigned int id, | 223 | extern int extcon_set_state(struct extcon_dev *edev, unsigned int id, |
224 | bool cable_state); | 224 | bool cable_state); |
225 | 225 | ||
226 | /* | 226 | /* |
@@ -305,14 +305,14 @@ static inline struct extcon_dev *devm_extcon_dev_allocate(struct device *dev, | |||
305 | 305 | ||
306 | static inline void devm_extcon_dev_free(struct extcon_dev *edev) { } | 306 | static inline void devm_extcon_dev_free(struct extcon_dev *edev) { } |
307 | 307 | ||
308 | static inline int extcon_get_cable_state_(struct extcon_dev *edev, | 308 | |
309 | unsigned int id) | 309 | static inline int extcon_get_state(struct extcon_dev *edev, unsigned int id) |
310 | { | 310 | { |
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |
313 | 313 | ||
314 | static inline int extcon_set_cable_state_(struct extcon_dev *edev, | 314 | static inline int extcon_set_state(struct extcon_dev *edev, unsigned int id, |
315 | unsigned int id, bool cable_state) | 315 | bool cable_state) |
316 | { | 316 | { |
317 | return 0; | 317 | return 0; |
318 | } | 318 | } |
@@ -402,4 +402,15 @@ static inline int extcon_unregister_interest(struct extcon_specific_cable_nb | |||
402 | { | 402 | { |
403 | return -EINVAL; | 403 | return -EINVAL; |
404 | } | 404 | } |
405 | |||
406 | static inline int extcon_get_cable_state_(struct extcon_dev *edev, unsigned int id) | ||
407 | { | ||
408 | return extcon_get_state(edev, id); | ||
409 | } | ||
410 | |||
411 | static inline int extcon_set_cable_state_(struct extcon_dev *edev, unsigned int id, | ||
412 | bool cable_state) | ||
413 | { | ||
414 | return extcon_set_state(edev, id, cable_state); | ||
415 | } | ||
405 | #endif /* __LINUX_EXTCON_H__ */ | 416 | #endif /* __LINUX_EXTCON_H__ */ |