diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-12-16 22:04:14 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-12-16 22:04:14 -0800 |
commit | 022573c275500e1a50889949f679d04b5446edf6 (patch) | |
tree | 766ab0e13fc38275466f8544d1bbf4982833cbff /drivers/input/misc/wm831x-on.c | |
parent | 516d798f656614f59553b1ff3592c2c36102b684 (diff) | |
parent | a455e2985f57e2a71566bb8850094af38b2c932d (diff) | |
download | blackbird-op-linux-022573c275500e1a50889949f679d04b5446edf6.tar.gz blackbird-op-linux-022573c275500e1a50889949f679d04b5446edf6.zip |
Merge branch 'next' into for-linus
Prepare first set of updates for 3.8 merge window.
Diffstat (limited to 'drivers/input/misc/wm831x-on.c')
-rw-r--r-- | drivers/input/misc/wm831x-on.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/input/misc/wm831x-on.c b/drivers/input/misc/wm831x-on.c index 6790a812a1db..558767d8ebf4 100644 --- a/drivers/input/misc/wm831x-on.c +++ b/drivers/input/misc/wm831x-on.c @@ -69,14 +69,15 @@ static irqreturn_t wm831x_on_irq(int irq, void *data) return IRQ_HANDLED; } -static int __devinit wm831x_on_probe(struct platform_device *pdev) +static int wm831x_on_probe(struct platform_device *pdev) { struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); struct wm831x_on *wm831x_on; int irq = wm831x_irq(wm831x, platform_get_irq(pdev, 0)); int ret; - wm831x_on = kzalloc(sizeof(struct wm831x_on), GFP_KERNEL); + wm831x_on = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_on), + GFP_KERNEL); if (!wm831x_on) { dev_err(&pdev->dev, "Can't allocate data\n"); return -ENOMEM; @@ -120,11 +121,10 @@ err_irq: err_input_dev: input_free_device(wm831x_on->dev); err: - kfree(wm831x_on); return ret; } -static int __devexit wm831x_on_remove(struct platform_device *pdev) +static int wm831x_on_remove(struct platform_device *pdev) { struct wm831x_on *wm831x_on = platform_get_drvdata(pdev); int irq = platform_get_irq(pdev, 0); @@ -132,14 +132,13 @@ static int __devexit wm831x_on_remove(struct platform_device *pdev) free_irq(irq, wm831x_on); cancel_delayed_work_sync(&wm831x_on->work); input_unregister_device(wm831x_on->dev); - kfree(wm831x_on); return 0; } static struct platform_driver wm831x_on_driver = { .probe = wm831x_on_probe, - .remove = __devexit_p(wm831x_on_remove), + .remove = wm831x_on_remove, .driver = { .name = "wm831x-on", .owner = THIS_MODULE, |