diff options
author | Mayank Rana <mrana@codeaurora.org> | 2020-03-16 13:14:32 -0700 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2020-03-25 08:16:13 +0900 |
commit | 995bb1092326b8ba8fa29456c334ac6a49765ccd (patch) | |
tree | b3ab165b1f786bf005a0608077b954204dce3742 | |
parent | 3426ad6d40ae5f46b4d75f1e0342565444e52f5f (diff) |
extcon: Mark extcon_get_edev_name() function as exported symbol
extcon_get_edev_name() function provides client driver to request
extcon dev's name. If extcon driver and client driver are compiled
as loadable modules, extcon_get_edev_name() function symbol is not
visible to client driver. Hence mark extcon_find_edev_name() function
as exported symbol.
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r-- | drivers/extcon/extcon.c | 1 | ||||
-rw-r--r-- | include/linux/extcon.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index e055893fd5c3..2dfbfec572f9 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -1406,6 +1406,7 @@ const char *extcon_get_edev_name(struct extcon_dev *edev) { return !edev ? NULL : edev->name; } +EXPORT_SYMBOL_GPL(extcon_get_edev_name); static int __init extcon_class_init(void) { diff --git a/include/linux/extcon.h b/include/linux/extcon.h index 1b1d77ec2114..fd183fb9c20f 100644 --- a/include/linux/extcon.h +++ b/include/linux/extcon.h @@ -286,6 +286,11 @@ static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, { return ERR_PTR(-ENODEV); } + +static inline const char *extcon_get_edev_name(struct extcon_dev *edev) +{ + return NULL; +} #endif /* CONFIG_EXTCON */ /* |