diff mbox

ALSA: hda: controller code - do not export static functions

Message ID 1424775897-9627-1-git-send-email-perex@perex.cz (mailing list archive)
State Accepted
Commit 37ed398839fa3e0d2de77925097db7a370abb096
Headers show

Commit Message

Jaroslav Kysela Feb. 24, 2015, 11:04 a.m. UTC
It is a bad idea to export static functions. GCC for some platforms
shows errors like:

  error: __ksymtab_azx_get_response causes a section type conflict

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 sound/pci/hda/hda_controller.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Takashi Iwai Feb. 24, 2015, 1:15 p.m. UTC | #1
At Tue, 24 Feb 2015 12:04:57 +0100,
Jaroslav Kysela wrote:
> 
> It is a bad idea to export static functions. GCC for some platforms
> shows errors like:
> 
>   error: __ksymtab_azx_get_response causes a section type conflict
> 
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>

Thanks, applied now.


Takashi

> ---
>  sound/pci/hda/hda_controller.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
> index ebb7a64..f63d2cb5 100644
> --- a/sound/pci/hda/hda_controller.c
> +++ b/sound/pci/hda/hda_controller.c
> @@ -978,7 +978,6 @@ static int azx_alloc_cmd_io(struct azx *chip)
>  		dev_err(chip->card->dev, "cannot allocate CORB/RIRB\n");
>  	return err;
>  }
> -EXPORT_SYMBOL_GPL(azx_alloc_cmd_io);
>  
>  static void azx_init_cmd_io(struct azx *chip)
>  {
> @@ -1043,7 +1042,6 @@ static void azx_init_cmd_io(struct azx *chip)
>  	azx_writeb(chip, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN);
>  	spin_unlock_irq(&chip->reg_lock);
>  }
> -EXPORT_SYMBOL_GPL(azx_init_cmd_io);
>  
>  static void azx_free_cmd_io(struct azx *chip)
>  {
> @@ -1053,7 +1051,6 @@ static void azx_free_cmd_io(struct azx *chip)
>  	azx_writeb(chip, CORBCTL, 0);
>  	spin_unlock_irq(&chip->reg_lock);
>  }
> -EXPORT_SYMBOL_GPL(azx_free_cmd_io);
>  
>  static unsigned int azx_command_addr(u32 cmd)
>  {
> @@ -1333,7 +1330,6 @@ static int azx_send_cmd(struct hda_bus *bus, unsigned int val)
>  	else
>  		return azx_corb_send_cmd(bus, val);
>  }
> -EXPORT_SYMBOL_GPL(azx_send_cmd);
>  
>  /* get a response */
>  static unsigned int azx_get_response(struct hda_bus *bus,
> @@ -1347,7 +1343,6 @@ static unsigned int azx_get_response(struct hda_bus *bus,
>  	else
>  		return azx_rirb_get_response(bus, addr);
>  }
> -EXPORT_SYMBOL_GPL(azx_get_response);
>  
>  #ifdef CONFIG_SND_HDA_DSP_LOADER
>  /*
> -- 
> 1.9.3
>
diff mbox

Patch

diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index ebb7a64..f63d2cb5 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -978,7 +978,6 @@  static int azx_alloc_cmd_io(struct azx *chip)
 		dev_err(chip->card->dev, "cannot allocate CORB/RIRB\n");
 	return err;
 }
-EXPORT_SYMBOL_GPL(azx_alloc_cmd_io);
 
 static void azx_init_cmd_io(struct azx *chip)
 {
@@ -1043,7 +1042,6 @@  static void azx_init_cmd_io(struct azx *chip)
 	azx_writeb(chip, RIRBCTL, AZX_RBCTL_DMA_EN | AZX_RBCTL_IRQ_EN);
 	spin_unlock_irq(&chip->reg_lock);
 }
-EXPORT_SYMBOL_GPL(azx_init_cmd_io);
 
 static void azx_free_cmd_io(struct azx *chip)
 {
@@ -1053,7 +1051,6 @@  static void azx_free_cmd_io(struct azx *chip)
 	azx_writeb(chip, CORBCTL, 0);
 	spin_unlock_irq(&chip->reg_lock);
 }
-EXPORT_SYMBOL_GPL(azx_free_cmd_io);
 
 static unsigned int azx_command_addr(u32 cmd)
 {
@@ -1333,7 +1330,6 @@  static int azx_send_cmd(struct hda_bus *bus, unsigned int val)
 	else
 		return azx_corb_send_cmd(bus, val);
 }
-EXPORT_SYMBOL_GPL(azx_send_cmd);
 
 /* get a response */
 static unsigned int azx_get_response(struct hda_bus *bus,
@@ -1347,7 +1343,6 @@  static unsigned int azx_get_response(struct hda_bus *bus,
 	else
 		return azx_rirb_get_response(bus, addr);
 }
-EXPORT_SYMBOL_GPL(azx_get_response);
 
 #ifdef CONFIG_SND_HDA_DSP_LOADER
 /*