diff options
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon_class.c | 1 | ||||
-rw-r--r-- | drivers/extcon/extcon_gpio.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 846d891..f9a7423 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c @@ -60,6 +60,7 @@ const char *extcon_cable_name[] = { [EXTCON_SPDIF_OUT] = "SPDIF-out", [EXTCON_VIDEO_IN] = "Video-in", [EXTCON_VIDEO_OUT] = "Video-out", + [EXTCON_MECHANICAL] = "Mechanical", NULL, }; diff --git a/drivers/extcon/extcon_gpio.c b/drivers/extcon/extcon_gpio.c index f24ec67..914e53c 100644 --- a/drivers/extcon/extcon_gpio.c +++ b/drivers/extcon/extcon_gpio.c @@ -130,6 +130,7 @@ static int gpio_extcon_probe(struct platform_device *pdev) if (ret < 0) goto err_request_irq; + platform_set_drvdata(pdev, extcon_data); /* Perform initial detection */ gpio_extcon_work(&extcon_data->work.work); @@ -152,6 +153,7 @@ static int gpio_extcon_remove(struct platform_device *pdev) struct gpio_extcon_data *extcon_data = platform_get_drvdata(pdev); cancel_delayed_work_sync(&extcon_data->work); + free_irq(extcon_data->irq, extcon_data); gpio_free(extcon_data->gpio); extcon_dev_unregister(&extcon_data->edev); devm_kfree(&pdev->dev, extcon_data); @@ -159,7 +161,7 @@ static int gpio_extcon_remove(struct platform_device *pdev) return 0; } -static struct platform_driver gpio_extcon = { +static struct platform_driver gpio_extcon_driver = { .probe = gpio_extcon_probe, .remove = gpio_extcon_remove, .driver = { @@ -168,7 +170,7 @@ static struct platform_driver gpio_extcon = { }, }; -module_platform_driver(gpio_extcon); +module_platform_driver(gpio_extcon_driver); MODULE_AUTHOR("Mike Lockwood <lockwood@android.com>"); MODULE_DESCRIPTION("GPIO extcon driver"); |