Skip to content

Commit

Permalink
[ALSA] Clean up EXPORT_SYMBOL()s in snd module
Browse files Browse the repository at this point in the history
Move EXPORT_SYMBOL()s to places adjacent to functions/variables.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai authored and Jaroslav Kysela committed Jun 22, 2006
1 parent 9bb22e2 commit c0d3fb3
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 88 deletions.
31 changes: 31 additions & 0 deletions sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ void snd_ctl_notify(struct snd_card *card, unsigned int mask,
read_unlock(&card->ctl_files_rwlock);
}

EXPORT_SYMBOL(snd_ctl_notify);

/**
* snd_ctl_new - create a control instance from the template
* @control: the control template
Expand Down Expand Up @@ -204,6 +206,8 @@ struct snd_kcontrol *snd_ctl_new(struct snd_kcontrol *control, unsigned int acce
return kctl;
}

EXPORT_SYMBOL(snd_ctl_new);

/**
* snd_ctl_new1 - create a control instance from the template
* @ncontrol: the initialization record
Expand Down Expand Up @@ -242,6 +246,8 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
return snd_ctl_new(&kctl, access);
}

EXPORT_SYMBOL(snd_ctl_new1);

/**
* snd_ctl_free_one - release the control instance
* @kcontrol: the control instance
Expand All @@ -259,6 +265,8 @@ void snd_ctl_free_one(struct snd_kcontrol *kcontrol)
}
}

EXPORT_SYMBOL(snd_ctl_free_one);

static unsigned int snd_ctl_hole_check(struct snd_card *card,
unsigned int count)
{
Expand Down Expand Up @@ -347,6 +355,8 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
return err;
}

EXPORT_SYMBOL(snd_ctl_add);

/**
* snd_ctl_remove - remove the control from the card and release it
* @card: the card instance
Expand All @@ -373,6 +383,8 @@ int snd_ctl_remove(struct snd_card *card, struct snd_kcontrol *kcontrol)
return 0;
}

EXPORT_SYMBOL(snd_ctl_remove);

/**
* snd_ctl_remove_id - remove the control of the given id and release it
* @card: the card instance
Expand All @@ -399,6 +411,8 @@ int snd_ctl_remove_id(struct snd_card *card, struct snd_ctl_elem_id *id)
return ret;
}

EXPORT_SYMBOL(snd_ctl_remove_id);

/**
* snd_ctl_remove_unlocked_id - remove the unlocked control of the given id and release it
* @file: active control handle
Expand Down Expand Up @@ -461,6 +475,8 @@ int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id,
return 0;
}

EXPORT_SYMBOL(snd_ctl_rename_id);

/**
* snd_ctl_find_numid - find the control instance with the given number-id
* @card: the card instance
Expand All @@ -487,6 +503,8 @@ struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numi
return NULL;
}

EXPORT_SYMBOL(snd_ctl_find_numid);

/**
* snd_ctl_find_id - find the control instance with the given id
* @card: the card instance
Expand Down Expand Up @@ -527,6 +545,8 @@ struct snd_kcontrol *snd_ctl_find_id(struct snd_card *card,
return NULL;
}

EXPORT_SYMBOL(snd_ctl_find_id);

static int snd_ctl_card_info(struct snd_card *card, struct snd_ctl_file * ctl,
unsigned int cmd, void __user *arg)
{
Expand Down Expand Up @@ -704,6 +724,8 @@ int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control)
return result;
}

EXPORT_SYMBOL(snd_ctl_elem_read);

static int snd_ctl_elem_read_user(struct snd_card *card,
struct snd_ctl_elem_value __user *_control)
{
Expand Down Expand Up @@ -767,6 +789,8 @@ int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
return result;
}

EXPORT_SYMBOL(snd_ctl_elem_write);

static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
struct snd_ctl_elem_value __user *_control)
{
Expand Down Expand Up @@ -1199,11 +1223,15 @@ int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn)
return _snd_ctl_register_ioctl(fcn, &snd_control_ioctls);
}

EXPORT_SYMBOL(snd_ctl_register_ioctl);

#ifdef CONFIG_COMPAT
int snd_ctl_register_ioctl_compat(snd_kctl_ioctl_func_t fcn)
{
return _snd_ctl_register_ioctl(fcn, &snd_control_compat_ioctls);
}

EXPORT_SYMBOL(snd_ctl_register_ioctl_compat);
#endif

/*
Expand Down Expand Up @@ -1236,12 +1264,15 @@ int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn)
return _snd_ctl_unregister_ioctl(fcn, &snd_control_ioctls);
}

EXPORT_SYMBOL(snd_ctl_unregister_ioctl);

#ifdef CONFIG_COMPAT
int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn)
{
return _snd_ctl_unregister_ioctl(fcn, &snd_control_compat_ioctls);
}

EXPORT_SYMBOL(snd_ctl_unregister_ioctl_compat);
#endif

static int snd_ctl_fasync(int fd, struct file * file, int on)
Expand Down
6 changes: 6 additions & 0 deletions sound/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ int snd_device_new(struct snd_card *card, snd_device_type_t type,
return 0;
}

EXPORT_SYMBOL(snd_device_new);

/**
* snd_device_free - release the device from the card
* @card: the card instance
Expand Down Expand Up @@ -107,6 +109,8 @@ int snd_device_free(struct snd_card *card, void *device_data)
return -ENXIO;
}

EXPORT_SYMBOL(snd_device_free);

/**
* snd_device_disconnect - disconnect the device
* @card: the card instance
Expand Down Expand Up @@ -182,6 +186,8 @@ int snd_device_register(struct snd_card *card, void *device_data)
return -ENXIO;
}

EXPORT_SYMBOL(snd_device_register);

/*
* register all the devices on the card.
* called from init.c
Expand Down
20 changes: 20 additions & 0 deletions sound/core/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,16 @@ int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...)
return res;
}

EXPORT_SYMBOL(snd_iprintf);

/*
*/

static struct proc_dir_entry *snd_proc_root = NULL;
struct snd_info_entry *snd_seq_root = NULL;
EXPORT_SYMBOL(snd_seq_root);

#ifdef CONFIG_SND_OSSEMUL
struct snd_info_entry *snd_oss_root = NULL;
#endif
Expand Down Expand Up @@ -687,6 +691,8 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len)
return 0;
}

EXPORT_SYMBOL(snd_info_get_line);

/**
* snd_info_get_str - parse a string token
* @dest: the buffer to store the string token
Expand Down Expand Up @@ -723,6 +729,8 @@ char *snd_info_get_str(char *dest, char *src, int len)
return src;
}

EXPORT_SYMBOL(snd_info_get_str);

/**
* snd_info_create_entry - create an info entry
* @name: the proc file name
Expand Down Expand Up @@ -774,6 +782,8 @@ struct snd_info_entry *snd_info_create_module_entry(struct module * module,
return entry;
}

EXPORT_SYMBOL(snd_info_create_module_entry);

/**
* snd_info_create_card_entry - create an info entry for the given card
* @card: the card instance
Expand All @@ -797,6 +807,8 @@ struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card,
return entry;
}

EXPORT_SYMBOL(snd_info_create_card_entry);

static int snd_info_dev_free_entry(struct snd_device *device)
{
struct snd_info_entry *entry = device->device_data;
Expand Down Expand Up @@ -867,6 +879,8 @@ int snd_card_proc_new(struct snd_card *card, const char *name,
return 0;
}

EXPORT_SYMBOL(snd_card_proc_new);

/**
* snd_info_free_entry - release the info entry
* @entry: the info entry
Expand All @@ -883,6 +897,8 @@ void snd_info_free_entry(struct snd_info_entry * entry)
kfree(entry);
}

EXPORT_SYMBOL(snd_info_free_entry);

/**
* snd_info_register - register the info entry
* @entry: the info entry
Expand Down Expand Up @@ -913,6 +929,8 @@ int snd_info_register(struct snd_info_entry * entry)
return 0;
}

EXPORT_SYMBOL(snd_info_register);

/**
* snd_info_unregister - de-register the info entry
* @entry: the info entry
Expand All @@ -937,6 +955,8 @@ int snd_info_unregister(struct snd_info_entry * entry)
return 0;
}

EXPORT_SYMBOL(snd_info_unregister);

/*
*/
Expand Down
2 changes: 2 additions & 0 deletions sound/core/info_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int snd_oss_info_register(int dev, int num, char *string)
return 0;
}

EXPORT_SYMBOL(snd_oss_info_register);

extern void snd_card_info_read_oss(struct snd_info_buffer *buffer);

static int snd_sndstat_show_strings(struct snd_info_buffer *buf, char *id, int dev)
Expand Down
20 changes: 20 additions & 0 deletions sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ struct snd_shutdown_f_ops {

unsigned int snd_cards_lock = 0; /* locked for registering/using */
struct snd_card *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
EXPORT_SYMBOL(snd_cards);

DEFINE_RWLOCK(snd_card_rwlock);

#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
#endif

#ifdef CONFIG_PROC_FS
Expand Down Expand Up @@ -169,6 +172,8 @@ struct snd_card *snd_card_new(int idx, const char *xid,
return NULL;
}

EXPORT_SYMBOL(snd_card_new);

static loff_t snd_disconnect_llseek(struct file *file, loff_t offset, int orig)
{
return -ENODEV;
Expand Down Expand Up @@ -298,6 +303,8 @@ int snd_card_disconnect(struct snd_card *card)
return 0;
}

EXPORT_SYMBOL(snd_card_disconnect);

/**
* snd_card_free - frees given soundcard structure
* @card: soundcard structure
Expand Down Expand Up @@ -360,6 +367,8 @@ int snd_card_free(struct snd_card *card)
return 0;
}

EXPORT_SYMBOL(snd_card_free);

static void snd_card_free_thread(void * __card)
{
struct snd_card *card = __card;
Expand Down Expand Up @@ -405,6 +414,8 @@ int snd_card_free_in_thread(struct snd_card *card)
return -EFAULT;
}

EXPORT_SYMBOL(snd_card_free_in_thread);

static void choose_default_id(struct snd_card *card)
{
int i, len, idx_flag = 0, loops = SNDRV_CARDS;
Expand Down Expand Up @@ -505,6 +516,8 @@ int snd_card_register(struct snd_card *card)
return 0;
}

EXPORT_SYMBOL(snd_card_register);

#ifdef CONFIG_PROC_FS
static struct snd_info_entry *snd_card_info_entry = NULL;

Expand Down Expand Up @@ -644,6 +657,8 @@ int snd_component_add(struct snd_card *card, const char *component)
return 0;
}

EXPORT_SYMBOL(snd_component_add);

/**
* snd_card_file_add - add the file to the file list of the card
* @card: soundcard structure
Expand Down Expand Up @@ -676,6 +691,8 @@ int snd_card_file_add(struct snd_card *card, struct file *file)
return 0;
}

EXPORT_SYMBOL(snd_card_file_add);

/**
* snd_card_file_remove - remove the file from the file list
* @card: soundcard structure
Expand Down Expand Up @@ -717,6 +734,8 @@ int snd_card_file_remove(struct snd_card *card, struct file *file)
return 0;
}

EXPORT_SYMBOL(snd_card_file_remove);

#ifdef CONFIG_PM
/**
* snd_power_wait - wait until the power-state is changed.
Expand Down Expand Up @@ -753,4 +772,5 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state)
return result;
}

EXPORT_SYMBOL(snd_power_wait);
#endif /* CONFIG_PM */
6 changes: 6 additions & 0 deletions sound/core/isadma.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ void snd_dma_program(unsigned long dma,
release_dma_lock(flags);
}

EXPORT_SYMBOL(snd_dma_program);

/**
* snd_dma_disable - stop the ISA DMA transfer
* @dma: the dma number
Expand All @@ -72,6 +74,8 @@ void snd_dma_disable(unsigned long dma)
release_dma_lock(flags);
}

EXPORT_SYMBOL(snd_dma_disable);

/**
* snd_dma_pointer - return the current pointer to DMA transfer buffer in bytes
* @dma: the dma number
Expand Down Expand Up @@ -101,3 +105,5 @@ unsigned int snd_dma_pointer(unsigned long dma, unsigned int size)
else
return size - result;
}

EXPORT_SYMBOL(snd_dma_pointer);
Loading

0 comments on commit c0d3fb3

Please sign in to comment.