diff options
author | Felipe Balbi <balbi@ti.com> | 2010-09-29 03:55:49 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-02-18 07:05:54 -0500 |
commit | cccad6d4b103e53fb3d1fc1467f654ecb572d047 (patch) | |
tree | 83403c73c85247aeffa82ceaea6d9a5ec726235d /drivers/usb/otg/twl6030-usb.c | |
parent | 002eda1348788f623dc42231dcda5f591d753124 (diff) |
usb: otg: notifier: switch to atomic notifier
most of our notifications, will be called from IRQ
context, so an atomic notifier suits the job better.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/otg/twl6030-usb.c')
-rw-r--r-- | drivers/usb/otg/twl6030-usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index 05f17b77d54c..8a91b4b832a1 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c | |||
@@ -263,13 +263,13 @@ static irqreturn_t twl6030_usb_irq(int irq, void *_twl) | |||
263 | twl->otg.state = OTG_STATE_B_IDLE; | 263 | twl->otg.state = OTG_STATE_B_IDLE; |
264 | twl->linkstat = status; | 264 | twl->linkstat = status; |
265 | twl->otg.last_event = status; | 265 | twl->otg.last_event = status; |
266 | blocking_notifier_call_chain(&twl->otg.notifier, | 266 | atomic_notifier_call_chain(&twl->otg.notifier, |
267 | status, twl->otg.gadget); | 267 | status, twl->otg.gadget); |
268 | } else { | 268 | } else { |
269 | status = USB_EVENT_NONE; | 269 | status = USB_EVENT_NONE; |
270 | twl->linkstat = status; | 270 | twl->linkstat = status; |
271 | twl->otg.last_event = status; | 271 | twl->otg.last_event = status; |
272 | blocking_notifier_call_chain(&twl->otg.notifier, | 272 | atomic_notifier_call_chain(&twl->otg.notifier, |
273 | status, twl->otg.gadget); | 273 | status, twl->otg.gadget); |
274 | if (twl->asleep) { | 274 | if (twl->asleep) { |
275 | regulator_disable(twl->usb3v3); | 275 | regulator_disable(twl->usb3v3); |
@@ -302,7 +302,7 @@ static irqreturn_t twl6030_usbotg_irq(int irq, void *_twl) | |||
302 | twl->otg.state = OTG_STATE_A_IDLE; | 302 | twl->otg.state = OTG_STATE_A_IDLE; |
303 | twl->linkstat = status; | 303 | twl->linkstat = status; |
304 | twl->otg.last_event = status; | 304 | twl->otg.last_event = status; |
305 | blocking_notifier_call_chain(&twl->otg.notifier, status, | 305 | atomic_notifier_call_chain(&twl->otg.notifier, status, |
306 | twl->otg.gadget); | 306 | twl->otg.gadget); |
307 | } else { | 307 | } else { |
308 | twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, | 308 | twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, |
@@ -419,7 +419,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) | |||
419 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) | 419 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) |
420 | dev_warn(&pdev->dev, "could not create sysfs file\n"); | 420 | dev_warn(&pdev->dev, "could not create sysfs file\n"); |
421 | 421 | ||
422 | BLOCKING_INIT_NOTIFIER_HEAD(&twl->otg.notifier); | 422 | ATOMIC_INIT_NOTIFIER_HEAD(&twl->otg.notifier); |
423 | 423 | ||
424 | twl->irq_enabled = true; | 424 | twl->irq_enabled = true; |
425 | status = request_threaded_irq(twl->irq1, NULL, twl6030_usbotg_irq, | 425 | status = request_threaded_irq(twl->irq1, NULL, twl6030_usbotg_irq, |