diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2015-06-11 20:17:02 +0900 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2015-08-10 11:48:55 +0900 |
commit | 2519b7650e99d90643a7a20d623513de9c95a817 (patch) | |
tree | 1bd74e01d8e4d7f2b23725db9d0fb480212fcd17 /drivers/extcon/extcon-gpio.c | |
parent | 85a77ff0160ab0a70eb4e8b14200e29b4d35c355 (diff) |
extcon: Remove optional print_state() function pointer of struct extcon_dev
This patch removes the optional print_state() function pointer which included
in 'struct extcon_dev' because the extcon must maintain the consistent name
of extcon device on sysfs instead of inconsistent state of external connectors.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-gpio.c')
-rw-r--r-- | drivers/extcon/extcon-gpio.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index 355459a54e8b..57c24fa52edb 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c @@ -65,22 +65,6 @@ static irqreturn_t gpio_irq_handler(int irq, void *dev_id) return IRQ_HANDLED; } -static ssize_t extcon_gpio_print_state(struct extcon_dev *edev, char *buf) -{ - struct device *dev = edev->dev.parent; - struct gpio_extcon_data *extcon_data = dev_get_drvdata(dev); - const char *state; - - if (extcon_get_state(edev)) - state = extcon_data->state_on; - else - state = extcon_data->state_off; - - if (state) - return sprintf(buf, "%s\n", state); - return -EINVAL; -} - static int gpio_extcon_probe(struct platform_device *pdev) { struct gpio_extcon_platform_data *pdata = dev_get_platdata(&pdev->dev); @@ -110,8 +94,6 @@ static int gpio_extcon_probe(struct platform_device *pdev) extcon_data->state_on = pdata->state_on; extcon_data->state_off = pdata->state_off; extcon_data->check_on_resume = pdata->check_on_resume; - if (pdata->state_on && pdata->state_off) - extcon_data->edev->print_state = extcon_gpio_print_state; ret = devm_gpio_request_one(&pdev->dev, extcon_data->gpio, GPIOF_DIR_IN, pdev->name); |