Skip to content

Commit

Permalink
[ALSA] sound: replace remaining __FUNCTION__ occurences
Browse files Browse the repository at this point in the history
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
hharrison authored and tiwai committed Apr 24, 2008
1 parent 24982c5 commit 9bf8e7d
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 62 deletions.
8 changes: 4 additions & 4 deletions sound/arm/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1) <= 0 &&
!((GSR | gsr_bits) & GSR_SDONE)) {
printk(KERN_ERR "%s: read error (ac97_reg=%d GSR=%#lx)\n",
__FUNCTION__, reg, GSR | gsr_bits);
__func__, reg, GSR | gsr_bits);
val = -1;
goto out;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
if (wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE, 1) <= 0 &&
!((GSR | gsr_bits) & GSR_CDONE))
printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n",
__FUNCTION__, reg, GSR | gsr_bits);
__func__, reg, GSR | gsr_bits);

mutex_unlock(&car_mutex);
}
Expand All @@ -131,7 +131,7 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)

if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
__FUNCTION__, gsr_bits);
__func__, gsr_bits);

/* let's try warm reset */
gsr_bits = 0;
Expand All @@ -150,7 +150,7 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)

if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)))
printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
__FUNCTION__, gsr_bits);
__func__, gsr_bits);
}

GCR &= ~(GCR_PRIRDY_IEN|GCR_SECRDY_IEN);
Expand Down
2 changes: 1 addition & 1 deletion sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int snd_disconnect_release(struct inode *inode, struct file *file)
if (likely(df))
return df->disconnected_f_op->release(inode, file);

panic("%s(%p, %p) failed!", __FUNCTION__, inode, file);
panic("%s(%p, %p) failed!", __func__, inode, file);
}

static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait)
Expand Down
28 changes: 14 additions & 14 deletions sound/isa/sb/sb16_csp.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
return -EFAULT;
if ((file_h.name != RIFF_HEADER) ||
(le32_to_cpu(file_h.len) >= SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE - sizeof(file_h))) {
snd_printd("%s: Invalid RIFF header\n", __FUNCTION__);
snd_printd("%s: Invalid RIFF header\n", __func__);
return -EINVAL;
}
data_ptr += sizeof(file_h);
Expand All @@ -340,7 +340,7 @@ static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
if (copy_from_user(&item_type, data_ptr, sizeof(item_type)))
return -EFAULT;
if (item_type != CSP__HEADER) {
snd_printd("%s: Invalid RIFF file type\n", __FUNCTION__);
snd_printd("%s: Invalid RIFF file type\n", __func__);
return -EINVAL;
}
data_ptr += sizeof (item_type);
Expand Down Expand Up @@ -395,7 +395,7 @@ static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
return -EFAULT;

if (code_h.name != MAIN_HEADER) {
snd_printd("%s: Missing 'main' microcode\n", __FUNCTION__);
snd_printd("%s: Missing 'main' microcode\n", __func__);
return -EINVAL;
}
data_ptr += sizeof(code_h);
Expand Down Expand Up @@ -439,7 +439,7 @@ static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
p->acc_format = p->acc_width = p->acc_rates = 0;
p->mode = 0;
snd_printd("%s: Unsupported CSP codec type: 0x%04x\n",
__FUNCTION__,
__func__,
le16_to_cpu(funcdesc_h.VOC_type));
return -EINVAL;
}
Expand All @@ -458,7 +458,7 @@ static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
return 0;
}
}
snd_printd("%s: Function #%d not found\n", __FUNCTION__, info.func_req);
snd_printd("%s: Function #%d not found\n", __func__, info.func_req);
return -EINVAL;
}

Expand Down Expand Up @@ -612,7 +612,7 @@ static int get_version(struct snd_sb *chip)
static int snd_sb_csp_check_version(struct snd_sb_csp * p)
{
if (p->version < 0x10 || p->version > 0x1f) {
snd_printd("%s: Invalid CSP version: 0x%x\n", __FUNCTION__, p->version);
snd_printd("%s: Invalid CSP version: 0x%x\n", __func__, p->version);
return 1;
}
return 0;
Expand All @@ -631,7 +631,7 @@ static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int
spin_lock_irqsave(&p->chip->reg_lock, flags);
snd_sbdsp_command(p->chip, 0x01); /* CSP download command */
if (snd_sbdsp_get_byte(p->chip)) {
snd_printd("%s: Download command failed\n", __FUNCTION__);
snd_printd("%s: Download command failed\n", __func__);
goto __fail;
}
/* Send CSP low byte (size - 1) */
Expand All @@ -658,7 +658,7 @@ static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int
udelay (10);
}
if (status != 0x55) {
snd_printd("%s: Microcode initialization failed\n", __FUNCTION__);
snd_printd("%s: Microcode initialization failed\n", __func__);
goto __fail;
}
} else {
Expand Down Expand Up @@ -824,19 +824,19 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channel
unsigned long flags;

if (!(p->running & (SNDRV_SB_CSP_ST_LOADED | SNDRV_SB_CSP_ST_AUTO))) {
snd_printd("%s: Microcode not loaded\n", __FUNCTION__);
snd_printd("%s: Microcode not loaded\n", __func__);
return -ENXIO;
}
if (p->running & SNDRV_SB_CSP_ST_RUNNING) {
snd_printd("%s: CSP already running\n", __FUNCTION__);
snd_printd("%s: CSP already running\n", __func__);
return -EBUSY;
}
if (!(sample_width & p->acc_width)) {
snd_printd("%s: Unsupported PCM sample width\n", __FUNCTION__);
snd_printd("%s: Unsupported PCM sample width\n", __func__);
return -EINVAL;
}
if (!(channels & p->acc_channels)) {
snd_printd("%s: Invalid number of channels\n", __FUNCTION__);
snd_printd("%s: Invalid number of channels\n", __func__);
return -EINVAL;
}

Expand All @@ -858,11 +858,11 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channel
s_type |= 0x22; /* 00dX 00dX (d = 1 if 8 bit samples) */

if (set_codec_parameter(p->chip, 0x81, s_type)) {
snd_printd("%s: Set sample type command failed\n", __FUNCTION__);
snd_printd("%s: Set sample type command failed\n", __func__);
goto __fail;
}
if (set_codec_parameter(p->chip, 0x80, 0x00)) {
snd_printd("%s: Codec start command failed\n", __FUNCTION__);
snd_printd("%s: Codec start command failed\n", __func__);
goto __fail;
}
p->run_width = sample_width;
Expand Down
6 changes: 3 additions & 3 deletions sound/isa/sb/sb_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int snd_sbdsp_command(struct snd_sb *chip, unsigned char val)
outb(val, SBP(chip, COMMAND));
return 1;
}
snd_printd("%s [0x%lx]: timeout (0x%x)\n", __FUNCTION__, chip->port, val);
snd_printd("%s [0x%lx]: timeout (0x%x)\n", __func__, chip->port, val);
return 0;
}

Expand All @@ -68,7 +68,7 @@ int snd_sbdsp_get_byte(struct snd_sb *chip)
return val;
}
}
snd_printd("%s [0x%lx]: timeout\n", __FUNCTION__, chip->port);
snd_printd("%s [0x%lx]: timeout\n", __func__, chip->port);
return -ENODEV;
}

Expand All @@ -87,7 +87,7 @@ int snd_sbdsp_reset(struct snd_sb *chip)
else
break;
}
snd_printdd("%s [0x%lx] failed...\n", __FUNCTION__, chip->port);
snd_printdd("%s [0x%lx] failed...\n", __func__, chip->port);
return -ENODEV;
}

Expand Down
2 changes: 1 addition & 1 deletion sound/oss/trident.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ enum miscint_bits {
#define VALIDATE_MAGIC(FOO,MAG) \
({ \
if (!(FOO) || (FOO)->magic != MAG) { \
printk(invalid_magic,__FUNCTION__); \
printk(invalid_magic,__func__); \
return -ENXIO; \
} \
})
Expand Down
6 changes: 3 additions & 3 deletions sound/oss/vwsnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ static void dbgassert(const char *fcn, int line, const char *expr)
* DBGRV - debug print function return when verbose
*/

#define ASSERT(e) ((e) ? (void) 0 : dbgassert(__FUNCTION__, __LINE__, #e))
#define ASSERT(e) ((e) ? (void) 0 : dbgassert(__func__, __LINE__, #e))
#define DBGDO(x) x
#define DBGX(fmt, args...) (in_interrupt() ? 0 : printk(KERN_ERR fmt, ##args))
#define DBGP(fmt, args...) (DBGX("%s: " fmt, __FUNCTION__ , ##args))
#define DBGE(fmt, args...) (DBGX("%s" fmt, __FUNCTION__ , ##args))
#define DBGP(fmt, args...) (DBGX("%s: " fmt, __func__ , ##args))
#define DBGE(fmt, args...) (DBGX("%s" fmt, __func__ , ##args))
#define DBGC(rtn) (DBGP("calling %s\n", rtn))
#define DBGR() (DBGP("returning\n"))
#define DBGXV(fmt, args...) (shut_up ? 0 : DBGX(fmt, ##args))
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/ad1889.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ snd_ad1889_ac97_ready(struct snd_ad1889 *chip)
mdelay(1);
if (!retry) {
snd_printk(KERN_ERR PFX "[%s] Link is not ready.\n",
__FUNCTION__);
__func__);
return -EIO;
}
ad1889_debug("[%s] ready after %d ms\n", __FUNCTION__, 400 - retry);
ad1889_debug("[%s] ready after %d ms\n", __func__, 400 - retry);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/als300.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@

#if DEBUG_CALLS
#define snd_als300_dbgcalls(format, args...) printk(format, ##args)
#define snd_als300_dbgcallenter() printk(KERN_ERR "--> %s\n", __FUNCTION__)
#define snd_als300_dbgcallleave() printk(KERN_ERR "<-- %s\n", __FUNCTION__)
#define snd_als300_dbgcallenter() printk(KERN_ERR "--> %s\n", __func__)
#define snd_als300_dbgcallleave() printk(KERN_ERR "<-- %s\n", __func__)
#else
#define snd_als300_dbgcalls(format, args...)
#define snd_als300_dbgcallenter()
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/azt3328.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ MODULE_SUPPORTED_DEVICE("{{Aztech,AZF3328}}");

#if DEBUG_CALLS
#define snd_azf3328_dbgcalls(format, args...) printk(format, ##args)
#define snd_azf3328_dbgcallenter() printk(KERN_ERR "--> %s\n", __FUNCTION__)
#define snd_azf3328_dbgcallleave() printk(KERN_ERR "<-- %s\n", __FUNCTION__)
#define snd_azf3328_dbgcallenter() printk(KERN_ERR "--> %s\n", __func__)
#define snd_azf3328_dbgcallleave() printk(KERN_ERR "<-- %s\n", __func__)
#else
#define snd_azf3328_dbgcalls(format, args...)
#define snd_azf3328_dbgcallenter()
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2670,7 +2670,7 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
t = stop_time.tv_sec - start_time.tv_sec;
t *= 1000000;
t += stop_time.tv_usec - start_time.tv_usec;
printk(KERN_INFO "%s: measured %lu usecs\n", __FUNCTION__, t);
printk(KERN_INFO "%s: measured %lu usecs\n", __func__, t);
if (t == 0) {
snd_printk(KERN_ERR "?? calculation error..\n");
return;
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/pxa/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97,
wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1);
if (!((GSR | gsr_bits) & GSR_SDONE)) {
printk(KERN_ERR "%s: read error (ac97_reg=%x GSR=%#lx)\n",
__FUNCTION__, reg, GSR | gsr_bits);
__func__, reg, GSR | gsr_bits);
val = -1;
goto out;
}
Expand Down Expand Up @@ -127,7 +127,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_CDONE, 1);
if (!((GSR | gsr_bits) & GSR_CDONE))
printk(KERN_ERR "%s: write error (ac97_reg=%x GSR=%#lx)\n",
__FUNCTION__, reg, GSR | gsr_bits);
__func__, reg, GSR | gsr_bits);

mutex_unlock(&car_mutex);
}
Expand All @@ -151,7 +151,7 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)

if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)))
printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
__FUNCTION__, gsr_bits);
__func__, gsr_bits);

GCR &= ~(GCR_PRIRDY_IEN|GCR_SECRDY_IEN);
GCR |= GCR_SDONE_IE|GCR_CDONE_IE;
Expand All @@ -178,7 +178,7 @@ static void pxa2xx_ac97_cold_reset(struct snd_ac97 *ac97)

if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)))
printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
__FUNCTION__, gsr_bits);
__func__, gsr_bits);

GCR &= ~(GCR_PRIRDY_IEN|GCR_SECRDY_IEN);
GCR |= GCR_SDONE_IE|GCR_CDONE_IE;
Expand Down
20 changes: 10 additions & 10 deletions sound/soc/s3c24xx/s3c24xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static void s3c24xx_snd_txctrl(int on)
u32 iiscon;
u32 iismod;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
Expand Down Expand Up @@ -134,7 +134,7 @@ static void s3c24xx_snd_rxctrl(int on)
u32 iiscon;
u32 iismod;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON);
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
Expand Down Expand Up @@ -182,7 +182,7 @@ static int s3c24xx_snd_lrsync(void)
u32 iiscon;
unsigned long timeout = jiffies + msecs_to_jiffies(5);

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

while (1) {
iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON);
Expand All @@ -201,7 +201,7 @@ static int s3c24xx_snd_lrsync(void)
*/
static inline int s3c24xx_snd_is_clkmaster(void)
{
DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1;
}
Expand All @@ -214,7 +214,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai,
{
u32 iismod;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);
DBG("hw_params r: IISMOD: %lx \n", iismod);
Expand Down Expand Up @@ -250,7 +250,7 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
u32 iismod;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
rtd->dai->cpu_dai->dma_data = &s3c24xx_i2s_pcm_stereo_out;
Expand Down Expand Up @@ -278,7 +278,7 @@ static int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
{
int ret = 0;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
Expand Down Expand Up @@ -320,7 +320,7 @@ static int s3c24xx_i2s_set_sysclk(struct snd_soc_cpu_dai *cpu_dai,
{
u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD);

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

iismod &= ~S3C2440_IISMOD_MPLL;

Expand All @@ -346,7 +346,7 @@ static int s3c24xx_i2s_set_clkdiv(struct snd_soc_cpu_dai *cpu_dai,
{
u32 reg;

DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

switch (div_id) {
case S3C24XX_DIV_BCLK:
Expand Down Expand Up @@ -381,7 +381,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate);

static int s3c24xx_i2s_probe(struct platform_device *pdev)
{
DBG("Entered %s\n", __FUNCTION__);
DBG("Entered %s\n", __func__);

s3c24xx_i2s.regs = ioremap(S3C2410_PA_IIS, 0x100);
if (s3c24xx_i2s.regs == NULL)
Expand Down
Loading

0 comments on commit 9bf8e7d

Please sign in to comment.