From 0ba41d917eeb87f608cf147f870ff2f4c1056bab Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 26 Feb 2014 13:02:17 +0100 Subject: ALSA: usb-audio: Use standard printk helpers Convert with dev_err() and co from snd_printk(), etc. As there are too deep indirections (e.g. ep->chip->dev->dev), a few new local macros, usb_audio_err() & co, are introduced. Also, the device numbers in some messages are dropped, as they are shown in the prefix automatically. Signed-off-by: Takashi Iwai --- sound/usb/usbaudio.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sound/usb/usbaudio.h') diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h index 5d2fe0530745..25c4c7e217de 100644 --- a/sound/usb/usbaudio.h +++ b/sound/usb/usbaudio.h @@ -60,6 +60,15 @@ struct snd_usb_audio { struct usb_host_interface *ctrl_intf; /* the audio control interface */ }; +#define usb_audio_err(chip, fmt, args...) \ + dev_err(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_warn(chip, fmt, args...) \ + dev_warn(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_info(chip, fmt, args...) \ + dev_info(&(chip)->dev->dev, fmt, ##args) +#define usb_audio_dbg(chip, fmt, args...) \ + dev_dbg(&(chip)->dev->dev, fmt, ##args) + /* * Information about devices with broken descriptors */ -- cgit v1.2.3-59-g8ed1b