aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 06:24:45 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-02 10:31:23 -0500
commitd18132aa15d2bf7a5f227b590175b73aa3591a91 (patch)
tree150dac5de81c7bc1d4e9c10629d0b562ad69ae38
parenta08800940f72bb5502a8b6afb675231cef0b3a62 (diff)
ALSA: asihpi: Remove always NULL parameter
snd_asihpi_hpi_new() takes a pointer to a pointer of a hwdep where if this parameter is provided the newly allocated hwdep is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/asihpi/asihpi.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index e9273fb2a505..7a55fefed5c4 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -2832,14 +2832,11 @@ static int snd_asihpi_hpi_ioctl(struct snd_hwdep *hw, struct file *file,
2832/* results in /dev/snd/hwC#D0 file for each card with index # 2832/* results in /dev/snd/hwC#D0 file for each card with index #
2833 also /proc/asound/hwdep will contain '#-00: asihpi (HPI) for each card' 2833 also /proc/asound/hwdep will contain '#-00: asihpi (HPI) for each card'
2834*/ 2834*/
2835static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, 2835static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, int device)
2836 int device, struct snd_hwdep **rhwdep)
2837{ 2836{
2838 struct snd_hwdep *hw; 2837 struct snd_hwdep *hw;
2839 int err; 2838 int err;
2840 2839
2841 if (rhwdep)
2842 *rhwdep = NULL;
2843 err = snd_hwdep_new(asihpi->card, "HPI", device, &hw); 2840 err = snd_hwdep_new(asihpi->card, "HPI", device, &hw);
2844 if (err < 0) 2841 if (err < 0)
2845 return err; 2842 return err;
@@ -2849,8 +2846,6 @@ static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi,
2849 hw->ops.ioctl = snd_asihpi_hpi_ioctl; 2846 hw->ops.ioctl = snd_asihpi_hpi_ioctl;
2850 hw->ops.release = snd_asihpi_hpi_release; 2847 hw->ops.release = snd_asihpi_hpi_release;
2851 hw->private_data = asihpi; 2848 hw->private_data = asihpi;
2852 if (rhwdep)
2853 *rhwdep = hw;
2854 return 0; 2849 return 0;
2855} 2850}
2856 2851
@@ -2993,7 +2988,7 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
2993 2988
2994 /* always create, can be enabled or disabled dynamically 2989 /* always create, can be enabled or disabled dynamically
2995 by enable_hwdep module param*/ 2990 by enable_hwdep module param*/
2996 snd_asihpi_hpi_new(asihpi, 0, NULL); 2991 snd_asihpi_hpi_new(asihpi, 0);
2997 2992
2998 strcpy(card->driver, "ASIHPI"); 2993 strcpy(card->driver, "ASIHPI");
2999 2994