From f4e9749f451747f7cdd334eae951357f839c57f2 Mon Sep 17 00:00:00 2001 From: Julia Lawall Date: Thu, 1 Jan 2009 18:14:35 +0100 Subject: ALSA: Use usb_set/get_intfdata Use the USB functions usb_get_intfdata and usb_set_intfdata instead of dev_get_drvdata and dev_set_drvdata, respectively. The semantic patch that makes this change for the usb_get_intfdata case is as follows: (http://www.emn.fr/x-info/coccinelle/) // @header@ @@ #include @same depends on header@ position p; @@ usb_get_intfdata@p(...) { ... } @depends on header@ position _p!=same.p; identifier _f; struct usb_interface*intf; @@ _f@_p(...) { <+... - dev_get_drvdata(&intf->dev) + usb_get_intfdata(intf) ...+> } // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai --- sound/usb/caiaq/caiaq-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/usb/caiaq') diff --git a/sound/usb/caiaq/caiaq-device.c b/sound/usb/caiaq/caiaq-device.c index b143ef7152f..a62500e387a 100644 --- a/sound/usb/caiaq/caiaq-device.c +++ b/sound/usb/caiaq/caiaq-device.c @@ -446,7 +446,7 @@ static int __devinit snd_probe(struct usb_interface *intf, if (!card) return -ENOMEM; - dev_set_drvdata(&intf->dev, card); + usb_set_intfdata(intf, card); ret = init_card(caiaqdev(card)); if (ret < 0) { log("unable to init card! (ret=%d)\n", ret); @@ -460,7 +460,7 @@ static int __devinit snd_probe(struct usb_interface *intf, static void snd_disconnect(struct usb_interface *intf) { struct snd_usb_caiaqdev *dev; - struct snd_card *card = dev_get_drvdata(&intf->dev); + struct snd_card *card = usb_get_intfdata(intf); debug("%s(%p)\n", __func__, intf); -- cgit v1.2.3-70-g09d2