diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 14:24:45 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 18:31:23 +0300 |
commit | d18132aa15d2bf7a5f227b590175b73aa3591a91 (patch) | |
tree | 150dac5de81c7bc1d4e9c10629d0b562ad69ae38 /sound/pci/asihpi/asihpi.c | |
parent | a08800940f72bb5502a8b6afb675231cef0b3a62 (diff) | |
download | linux-d18132aa15d2bf7a5f227b590175b73aa3591a91.tar.xz |
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>
Diffstat (limited to 'sound/pci/asihpi/asihpi.c')
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 9 |
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, /* results in /dev/snd/hwC#D0 file for each card with index # also /proc/asound/hwdep will contain '#-00: asihpi (HPI) for each card' */ -static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, - int device, struct snd_hwdep **rhwdep) +static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, int device) { struct snd_hwdep *hw; int err; - if (rhwdep) - *rhwdep = NULL; err = snd_hwdep_new(asihpi->card, "HPI", device, &hw); if (err < 0) return err; @@ -2849,8 +2846,6 @@ static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, hw->ops.ioctl = snd_asihpi_hpi_ioctl; hw->ops.release = snd_asihpi_hpi_release; hw->private_data = asihpi; - if (rhwdep) - *rhwdep = hw; return 0; } @@ -2993,7 +2988,7 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev, /* always create, can be enabled or disabled dynamically by enable_hwdep module param*/ - snd_asihpi_hpi_new(asihpi, 0, NULL); + snd_asihpi_hpi_new(asihpi, 0); strcpy(card->driver, "ASIHPI"); |