]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/ppc/beep.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / sound / ppc / beep.c
index 5f38f670102c8940bedc6d90b56d5e8be32e754b..566b5ab9d4e892008c95c5658746b7f4fb3aff28 100644 (file)
@@ -118,7 +118,7 @@ static int snd_pmac_beep_event(struct input_dev *dev, unsigned int type,
        default: return -1;
        }
 
-       chip = dev->private;
+       chip = input_get_drvdata(dev);
        if (! chip || (beep = chip->beep) == NULL)
                return -1;
 
@@ -236,11 +236,11 @@ int __init snd_pmac_attach_beep(struct snd_pmac *chip)
        input_dev->id.product = 0x0001;
        input_dev->id.version = 0x0100;
 
-       input_dev->evbit[0] = BIT(EV_SND);
-       input_dev->sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
+       input_dev->evbit[0] = BIT_MASK(EV_SND);
+       input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(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 snd_pmac *chip)
        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)