All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ppc-beep - switch to using input_dev->dev.parent
@ 2007-05-08  4:22 Dmitry Torokhov
  0 siblings, 0 replies; only message in thread
From: Dmitry Torokhov @ 2007-05-08  4:22 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai

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: Dmitry Torokhov <dtor@mail.ru>
---

 sound/ppc/beep.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: work/sound/ppc/beep.c
===================================================================
--- work.orig/sound/ppc/beep.c
+++ work/sound/ppc/beep.c
@@ -118,7 +118,7 @@ static int snd_pmac_beep_event(struct in
 	default: return -1;
 	}
 
-	chip = dev->private;
+	chip = input_get_drvdata(dev);
 	if (! chip || (beep = chip->beep) == NULL)
 		return -1;
 
@@ -239,8 +239,8 @@ int __init snd_pmac_attach_beep(struct s
 	input_dev->evbit[0] = BIT(EV_SND);
 	input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
 	input_dev->event = snd_pmac_beep_event;
-	input_dev->private = chip;
-	input_dev->cdev.dev = &chip->pdev->dev;
+	input_dev->dev.parent = &chip->pdev->dev;
+	input_set_drvdata(input_dev, chip);
 
 	beep->dev = input_dev;
 	beep->buf = dmabuf;
@@ -251,8 +251,8 @@ int __init snd_pmac_attach_beep(struct s
 	err = snd_ctl_add(chip->card, beep_ctl);
 	if (err < 0)
 		goto fail1;
- 
- 	chip->beep = beep;
+
+	chip->beep = beep;
 
 	err = input_register_device(beep->dev);
 	if (err)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-08  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-08  4:22 [PATCH] ppc-beep - switch to using input_dev->dev.parent Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.