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/usx2y/us122l.c | 4 ++-- sound/usb/usx2y/usbusx2y.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sound/usb/usx2y') diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index c2515b6..73e59f4 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c @@ -589,7 +589,7 @@ static int snd_us122l_suspend(struct usb_interface *intf, pm_message_t message) struct us122l *us122l; struct list_head *p; - card = dev_get_drvdata(&intf->dev); + card = usb_get_intfdata(intf); if (!card) return 0; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -615,7 +615,7 @@ static int snd_us122l_resume(struct usb_interface *intf) struct list_head *p; int err; - card = dev_get_drvdata(&intf->dev); + card = usb_get_intfdata(intf); if (!card) return 0; diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index e5981a6..ca26c53 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c @@ -392,7 +392,7 @@ static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_i void *chip; chip = usX2Y_usb_probe(interface_to_usbdev(intf), intf, id); if (chip) { - dev_set_drvdata(&intf->dev, chip); + usb_set_intfdata(intf, chip); return 0; } else return -EIO; @@ -401,7 +401,7 @@ static int snd_usX2Y_probe(struct usb_interface *intf, const struct usb_device_i static void snd_usX2Y_disconnect(struct usb_interface *intf) { usX2Y_usb_disconnect(interface_to_usbdev(intf), - dev_get_drvdata(&intf->dev)); + usb_get_intfdata(intf)); } MODULE_DEVICE_TABLE(usb, snd_usX2Y_usb_id_table); -- cgit v1.1