Commit deed7f70 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Tony Lindgren

Switch brf6150 and hci_h4p to use gpio_request/free calls

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent aa523d75
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/gpio.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/irqs.h> #include <mach/irqs.h>
...@@ -913,7 +913,7 @@ static int __init brf6150_init(void) ...@@ -913,7 +913,7 @@ static int __init brf6150_init(void)
NBT_DBG("Uart: %d\n", info->btinfo->bt_uart); NBT_DBG("Uart: %d\n", info->btinfo->bt_uart);
NBT_DBG("sysclk: %d\n", info->btinfo->bt_sysclk); NBT_DBG("sysclk: %d\n", info->btinfo->bt_sysclk);
err = omap_request_gpio(info->btinfo->reset_gpio); err = gpio_request(info->btinfo->reset_gpio, "BT reset");
if (err < 0) if (err < 0)
{ {
printk(KERN_WARNING "Cannot get GPIO line %d", printk(KERN_WARNING "Cannot get GPIO line %d",
...@@ -922,23 +922,23 @@ static int __init brf6150_init(void) ...@@ -922,23 +922,23 @@ static int __init brf6150_init(void)
return err; return err;
} }
err = omap_request_gpio(info->btinfo->bt_wakeup_gpio); err = gpio_request(info->btinfo->bt_wakeup_gpio, "BT wakeup");
if (err < 0) if (err < 0)
{ {
printk(KERN_WARNING "Cannot get GPIO line 0x%d", printk(KERN_WARNING "Cannot get GPIO line 0x%d",
info->btinfo->bt_wakeup_gpio); info->btinfo->bt_wakeup_gpio);
omap_free_gpio(info->btinfo->reset_gpio); gpio_free(info->btinfo->reset_gpio);
kfree(info); kfree(info);
return err; return err;
} }
err = omap_request_gpio(info->btinfo->host_wakeup_gpio); err = gpio_request(info->btinfo->host_wakeup_gpio, "BT host wakeup");
if (err < 0) if (err < 0)
{ {
printk(KERN_WARNING "Cannot get GPIO line %d", printk(KERN_WARNING "Cannot get GPIO line %d",
info->btinfo->host_wakeup_gpio); info->btinfo->host_wakeup_gpio);
omap_free_gpio(info->btinfo->reset_gpio); gpio_free(info->btinfo->reset_gpio);
omap_free_gpio(info->btinfo->bt_wakeup_gpio); gpio_free(info->btinfo->bt_wakeup_gpio);
kfree(info); kfree(info);
return err; return err;
} }
...@@ -1022,9 +1022,9 @@ cleanup_irq: ...@@ -1022,9 +1022,9 @@ cleanup_irq:
free_irq(irq, (void *)info); free_irq(irq, (void *)info);
free_irq(gpio_to_irq(info->btinfo->host_wakeup_gpio), (void *)info); free_irq(gpio_to_irq(info->btinfo->host_wakeup_gpio), (void *)info);
cleanup: cleanup:
omap_free_gpio(info->btinfo->reset_gpio); gpio_free(info->btinfo->reset_gpio);
omap_free_gpio(info->btinfo->bt_wakeup_gpio); gpio_free(info->btinfo->bt_wakeup_gpio);
omap_free_gpio(info->btinfo->host_wakeup_gpio); gpio_free(info->btinfo->host_wakeup_gpio);
kfree(info); kfree(info);
return err; return err;
...@@ -1034,9 +1034,9 @@ static void __exit brf6150_exit(void) ...@@ -1034,9 +1034,9 @@ static void __exit brf6150_exit(void)
{ {
brf6150_hci_close(exit_info->hdev); brf6150_hci_close(exit_info->hdev);
hci_free_dev(exit_info->hdev); hci_free_dev(exit_info->hdev);
omap_free_gpio(exit_info->btinfo->reset_gpio); gpio_free(exit_info->btinfo->reset_gpio);
omap_free_gpio(exit_info->btinfo->bt_wakeup_gpio); gpio_free(exit_info->btinfo->bt_wakeup_gpio);
omap_free_gpio(exit_info->btinfo->host_wakeup_gpio); gpio_free(exit_info->btinfo->host_wakeup_gpio);
free_irq(exit_info->irq, (void *)exit_info); free_irq(exit_info->irq, (void *)exit_info);
free_irq(gpio_to_irq(exit_info->btinfo->host_wakeup_gpio), (void *)exit_info); free_irq(gpio_to_irq(exit_info->btinfo->host_wakeup_gpio), (void *)exit_info);
kfree(exit_info); kfree(exit_info);
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/gpio.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/gpio.h>
#include <mach/board.h> #include <mach/board.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/pm.h> #include <mach/pm.h>
...@@ -823,7 +823,7 @@ static int hci_h4p_probe(struct platform_device *pdev) ...@@ -823,7 +823,7 @@ static int hci_h4p_probe(struct platform_device *pdev)
NBT_DBG("Uart: %d\n", bt_config->bt_uart); NBT_DBG("Uart: %d\n", bt_config->bt_uart);
NBT_DBG("sysclk: %d\n", info->bt_sysclk); NBT_DBG("sysclk: %d\n", info->bt_sysclk);
err = omap_request_gpio(info->reset_gpio); err = gpio_request(info->reset_gpio, "BT reset");
if (err < 0) { if (err < 0) {
dev_err(&pdev->dev, "Cannot get GPIO line %d\n", dev_err(&pdev->dev, "Cannot get GPIO line %d\n",
info->reset_gpio); info->reset_gpio);
...@@ -831,23 +831,23 @@ static int hci_h4p_probe(struct platform_device *pdev) ...@@ -831,23 +831,23 @@ static int hci_h4p_probe(struct platform_device *pdev)
goto cleanup; goto cleanup;
} }
err = omap_request_gpio(info->bt_wakeup_gpio); err = gpio_request(info->bt_wakeup_gpio, "BT wakeup");
if (err < 0) if (err < 0)
{ {
dev_err(info->dev, "Cannot get GPIO line 0x%d", dev_err(info->dev, "Cannot get GPIO line 0x%d",
info->bt_wakeup_gpio); info->bt_wakeup_gpio);
omap_free_gpio(info->reset_gpio); gpio_free(info->reset_gpio);
kfree(info); kfree(info);
goto cleanup; goto cleanup;
} }
err = omap_request_gpio(info->host_wakeup_gpio); err = gpio_request(info->host_wakeup_gpio, "BT host wakeup");
if (err < 0) if (err < 0)
{ {
dev_err(info->dev, "Cannot get GPIO line %d", dev_err(info->dev, "Cannot get GPIO line %d",
info->host_wakeup_gpio); info->host_wakeup_gpio);
omap_free_gpio(info->reset_gpio); gpio_free(info->reset_gpio);
omap_free_gpio(info->bt_wakeup_gpio); gpio_free(info->bt_wakeup_gpio);
kfree(info); kfree(info);
goto cleanup; goto cleanup;
} }
...@@ -953,9 +953,9 @@ cleanup_irq: ...@@ -953,9 +953,9 @@ cleanup_irq:
free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *)info); free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *)info);
cleanup: cleanup:
gpio_set_value(info->reset_gpio, 0); gpio_set_value(info->reset_gpio, 0);
omap_free_gpio(info->reset_gpio); gpio_free(info->reset_gpio);
omap_free_gpio(info->bt_wakeup_gpio); gpio_free(info->bt_wakeup_gpio);
omap_free_gpio(info->host_wakeup_gpio); gpio_free(info->host_wakeup_gpio);
kfree(info); kfree(info);
return err; return err;
...@@ -971,9 +971,9 @@ static int hci_h4p_remove(struct platform_device *dev) ...@@ -971,9 +971,9 @@ static int hci_h4p_remove(struct platform_device *dev)
hci_h4p_hci_close(info->hdev); hci_h4p_hci_close(info->hdev);
free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *) info); free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *) info);
hci_free_dev(info->hdev); hci_free_dev(info->hdev);
omap_free_gpio(info->reset_gpio); gpio_free(info->reset_gpio);
omap_free_gpio(info->bt_wakeup_gpio); gpio_free(info->bt_wakeup_gpio);
omap_free_gpio(info->host_wakeup_gpio); gpio_free(info->host_wakeup_gpio);
free_irq(info->irq, (void *) info); free_irq(info->irq, (void *) info);
kfree(info); kfree(info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment