alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: trivial cleanup of old ifdefs
@ 2018-05-24  9:25 Takashi Iwai
  2018-05-24  9:25 ` [PATCH 1/3] ALSA: memalloc: Drop superfluous ifndef Takashi Iwai
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Takashi Iwai @ 2018-05-24  9:25 UTC (permalink / raw)
  To: alsa-devel

Hi,

this is a series of cleanup patches for removing the old ifndefs
that were needed for external alsa-driver builds.

No functional changes, just cleanups.


Takashi

===

Takashi Iwai (3):
  ALSA: memalloc: Drop superfluous ifndef
  ALSA: usb-audio: Drop superfluous ifndef
  ALSA: echoaudio: Drop superfluous macro

 include/sound/memalloc.h        | 2 --
 sound/pci/echoaudio/echoaudio.c | 2 +-
 sound/pci/echoaudio/echoaudio.h | 6 ------
 sound/usb/helper.h              | 4 ----
 4 files changed, 1 insertion(+), 13 deletions(-)

-- 
2.16.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] ALSA: memalloc: Drop superfluous ifndef
  2018-05-24  9:25 [PATCH 0/3] ALSA: trivial cleanup of old ifdefs Takashi Iwai
@ 2018-05-24  9:25 ` Takashi Iwai
  2018-05-24  9:25 ` [PATCH 2/3] ALSA: usb-audio: " Takashi Iwai
  2018-05-24  9:25 ` [PATCH 3/3] ALSA: echoaudio: Drop superfluous macro Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2018-05-24  9:25 UTC (permalink / raw)
  To: alsa-devel

Drop the superfluous #ifndef check in memalloc.h that had been put
just for allowing building the alsa-driver kernel modules externally.
Since the external build was discontinued years ago, let's clean up
the old kludges.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 include/sound/memalloc.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 782d1df34208..9c3db3dce32b 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -34,11 +34,9 @@ struct snd_dma_device {
 	struct device *dev;		/* generic device */
 };
 
-#ifndef snd_dma_pci_data
 #define snd_dma_pci_data(pci)	(&(pci)->dev)
 #define snd_dma_isa_data()	NULL
 #define snd_dma_continuous_data(x)	((struct device *)(__force unsigned long)(x))
-#endif
 
 
 /*
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ALSA: usb-audio: Drop superfluous ifndef
  2018-05-24  9:25 [PATCH 0/3] ALSA: trivial cleanup of old ifdefs Takashi Iwai
  2018-05-24  9:25 ` [PATCH 1/3] ALSA: memalloc: Drop superfluous ifndef Takashi Iwai
@ 2018-05-24  9:25 ` Takashi Iwai
  2018-05-24  9:25 ` [PATCH 3/3] ALSA: echoaudio: Drop superfluous macro Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2018-05-24  9:25 UTC (permalink / raw)
  To: alsa-devel

Drop the superfluous #ifndef checks that had been put just for
allowing building the alsa-driver kernel modules externally.
Since the external build was discontinued years ago, let's clean up
the old kludges.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/helper.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sound/usb/helper.h b/sound/usb/helper.h
index 4463e6d6dcb3..d338bd0e0ca6 100644
--- a/sound/usb/helper.h
+++ b/sound/usb/helper.h
@@ -18,16 +18,12 @@ unsigned char snd_usb_parse_datainterval(struct snd_usb_audio *chip,
  * retrieve usb_interface descriptor from the host interface
  * (conditional for compatibility with the older API)
  */
-#ifndef get_iface_desc
 #define get_iface_desc(iface)	(&(iface)->desc)
 #define get_endpoint(alt,ep)	(&(alt)->endpoint[ep].desc)
 #define get_ep_desc(ep)		(&(ep)->desc)
 #define get_cfg_desc(cfg)	(&(cfg)->desc)
-#endif
 
-#ifndef snd_usb_get_speed
 #define snd_usb_get_speed(dev) ((dev)->speed)
-#endif
 
 static inline int snd_usb_ctrl_intf(struct snd_usb_audio *chip)
 {
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ALSA: echoaudio: Drop superfluous macro
  2018-05-24  9:25 [PATCH 0/3] ALSA: trivial cleanup of old ifdefs Takashi Iwai
  2018-05-24  9:25 ` [PATCH 1/3] ALSA: memalloc: Drop superfluous ifndef Takashi Iwai
  2018-05-24  9:25 ` [PATCH 2/3] ALSA: usb-audio: " Takashi Iwai
@ 2018-05-24  9:25 ` Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2018-05-24  9:25 UTC (permalink / raw)
  To: alsa-devel

Drop pci_device() macro that just leads to chip->pci->dev, and pass it
directly to request_firmware().  It was introduced for allowing the
external alsa-driver kernel module builds.  Since it was discontinued
years ago, we should clean it up now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/echoaudio/echoaudio.c | 2 +-
 sound/pci/echoaudio/echoaudio.h | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 0935a5c8741f..358ef7dcf410 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -59,7 +59,7 @@ static int get_firmware(const struct firmware **fw_entry,
 	dev_dbg(chip->card->dev,
 		"firmware requested: %s\n", card_fw[fw_index].data);
 	snprintf(name, sizeof(name), "ea/%s", card_fw[fw_index].data);
-	err = request_firmware(fw_entry, name, pci_device(chip));
+	err = request_firmware(fw_entry, name, &chip->pci->dev);
 	if (err < 0)
 		dev_err(chip->card->dev,
 			"get_firmware(): Firmware not available (%d)\n", err);
diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h
index 152ce158583c..44b390a667d5 100644
--- a/sound/pci/echoaudio/echoaudio.h
+++ b/sound/pci/echoaudio/echoaudio.h
@@ -559,10 +559,4 @@ static inline int monitor_index(const struct echoaudio *chip, int out, int in)
 	return out * num_busses_in(chip) + in;
 }
 
-
-#ifndef pci_device
-#define pci_device(chip) (&chip->pci->dev)
-#endif
-
-
 #endif /* _ECHOAUDIO_H_ */
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-24  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-24  9:25 [PATCH 0/3] ALSA: trivial cleanup of old ifdefs Takashi Iwai
2018-05-24  9:25 ` [PATCH 1/3] ALSA: memalloc: Drop superfluous ifndef Takashi Iwai
2018-05-24  9:25 ` [PATCH 2/3] ALSA: usb-audio: " Takashi Iwai
2018-05-24  9:25 ` [PATCH 3/3] ALSA: echoaudio: Drop superfluous macro Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).