hc
2023-11-20 69d6da3c1c63675524a25e7dc92a4f43c4164cef
kernel/drivers/headset_observe/rk_headset.c
....@@ -153,7 +153,6 @@
153153 {
154154 int level = 0;
155155 int level2 = 0;
156
- int ret;
157156 struct rk_headset_pdata *pdata = headset_info->pdata;
158157 static unsigned int old_status = 0;
159158
....@@ -183,11 +182,6 @@
183182 headset_info->headset_status ? "in" : "out");
184183 if (headset_info->headset_status == HEADSET_IN) {
185184 headset_info->cur_headset_status = BIT_HEADSET_NO_MIC;
186
- ret = gpio_direction_output(pdata->spk_ctl_gpio,0);
187
- if (ret < 0) {
188
- printk("spk_ctl_gpio set direction fail\n");
189
- }
190
-
191185 if (pdata->headset_insert_type == HEADSET_IN_HIGH)
192186 irq_set_irq_type(headset_info->irq[HEADSET],
193187 IRQF_TRIGGER_FALLING);
....@@ -202,10 +196,6 @@
202196 goto out;
203197 }
204198 } else if (headset_info->headset_status == HEADSET_OUT) {
205
- ret = gpio_direction_output(pdata->spk_ctl_gpio,1);
206
- if (ret < 0) {
207
- printk("spk_ctl_gpio set direction fail\n");
208
- }
209199 headset_info->hook_status = HOOK_UP;
210200 if (headset_info->isHook_irq == enable) {
211201 DBG("disable headset_hook irq\n");