#include <asm/mach-types.h>
 #include <asm/arch/hardware.h>
-#include <asm/arch/gpio.h>
+#include <linux/gpio.h>
 #include <asm/arch/mcbsp.h>
 
 #include "omap-mcbsp.h"
 #include "omap-pcm.h"
 #include "../codecs/tlv320aic3x.h"
 
-#define RX44_HEADSET_AMP_GPIO  10
-#define RX44_SPEAKER_AMP_GPIO  101
+#define N810_HEADSET_AMP_GPIO  10
+#define N810_SPEAKER_AMP_GPIO  101
 
 static struct clk *sys_clkout2;
 static struct clk *sys_clkout2_src;
                          struct snd_kcontrol *k, int event)
 {
        if (SND_SOC_DAPM_EVENT_ON(event))
-               omap_set_gpio_dataout(RX44_SPEAKER_AMP_GPIO, 1);
+               gpio_set_value(N810_SPEAKER_AMP_GPIO, 1);
        else
-               omap_set_gpio_dataout(RX44_SPEAKER_AMP_GPIO, 0);
+               gpio_set_value(N810_SPEAKER_AMP_GPIO, 0);
 
        return 0;
 }
                           struct snd_kcontrol *k, int event)
 {
        if (SND_SOC_DAPM_EVENT_ON(event))
-               omap_set_gpio_dataout(RX44_HEADSET_AMP_GPIO, 1);
+               gpio_set_value(N810_HEADSET_AMP_GPIO, 1);
        else
-               omap_set_gpio_dataout(RX44_HEADSET_AMP_GPIO, 0);
+               gpio_set_value(N810_HEADSET_AMP_GPIO, 0);
 
        return 0;
 }
        clk_set_parent(sys_clkout2_src, func96m_clk);
        clk_set_rate(sys_clkout2, 12000000);
 
-       if (omap_request_gpio(RX44_HEADSET_AMP_GPIO) < 0)
+       if (gpio_request(N810_HEADSET_AMP_GPIO, "hs_amp") < 0)
                BUG();
-       if (omap_request_gpio(RX44_SPEAKER_AMP_GPIO) < 0)
+       if (gpio_request(N810_SPEAKER_AMP_GPIO, "spk_amp") < 0)
                BUG();
-       omap_set_gpio_direction(RX44_HEADSET_AMP_GPIO, 0);
-       omap_set_gpio_direction(RX44_SPEAKER_AMP_GPIO, 0);
+       gpio_direction_output(N810_HEADSET_AMP_GPIO, 0);
+       gpio_direction_output(N810_SPEAKER_AMP_GPIO, 0);
 
        return 0;
 err2:
 
 static void __exit n810_soc_exit(void)
 {
+       gpio_free(N810_SPEAKER_AMP_GPIO);
+       gpio_free(N810_HEADSET_AMP_GPIO);
+
        platform_device_unregister(n810_snd_device);
 }