Commit 1e2831db authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: ppc-beep - switch to using input_dev->dev.parent

In preparation for struct class_device -> struct device input
core conversion, switch to using input_dev->dev.parent when
specifying device position in sysfs tree.

Also, do not access input_dev->private directly, use helpers.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent ae91d10a
...@@ -118,7 +118,7 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type, ...@@ -118,7 +118,7 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type,
default: return -1; default: return -1;
} }
chip = dev->private; chip = input_get_drvdata(dev);
if (! chip || (beep = chip->beep) == NULL) if (! chip || (beep = chip->beep) == NULL)
return -1; return -1;
...@@ -239,8 +239,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip) ...@@ -239,8 +239,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip)
input_dev->evbit[0] = BIT(EV_SND); input_dev->evbit[0] = BIT(EV_SND);
input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE); input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
input_dev->event = snd_pmac_beep_event; input_dev->event = snd_pmac_beep_event;
input_dev->private = chip; input_dev->dev.parent = &chip->pdev->dev;
input_dev->cdev.dev = &chip->pdev->dev; input_set_drvdata(input_dev, chip);
beep->dev = input_dev; beep->dev = input_dev;
beep->buf = dmabuf; beep->buf = dmabuf;
...@@ -251,8 +251,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip) ...@@ -251,8 +251,8 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip)
err = snd_ctl_add(chip->card, beep_ctl); err = snd_ctl_add(chip->card, beep_ctl);
if (err < 0) if (err < 0)
goto fail1; goto fail1;
chip->beep = beep; chip->beep = beep;
err = input_register_device(beep->dev); err = input_register_device(beep->dev);
if (err) if (err)
......
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