lkml.org 
[lkml]   [2023]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 12/32] sound: usb: Export USB SND APIs for modules
On Tue, 25 Jul 2023 07:33:57 +0200,
Greg KH wrote:
>
> On Mon, Jul 24, 2023 at 07:33:56PM -0700, Wesley Cheng wrote:
> > --- a/sound/usb/pcm.c
> > +++ b/sound/usb/pcm.c
> > @@ -87,7 +87,7 @@ static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream
> > /*
> > * find a matching audio format
> > */
> > -static const struct audioformat *
> > +const struct audioformat *
> > find_format(struct list_head *fmt_list_head, snd_pcm_format_t format,
> > unsigned int rate, unsigned int channels, bool strict_match,
> > struct snd_usb_substream *subs)
> > @@ -147,8 +147,9 @@ find_format(struct list_head *fmt_list_head, snd_pcm_format_t format,
> > }
> > return found;
> > }
> > +EXPORT_SYMBOL_GPL(find_format);
>
> This is a horrible symbol name for a global function, same for the other
> ones in this file. If you really want to export them, please put them
> in the proper "snd_" prefix namespace, or better yet, use a module
> namespace as well to ensure that we know who is using them.

Yes, please add snd_usb_ prefix for all exported symbols from
USB-audio driver code.

Also, make sure that EXPORT_SYMBOL_GPL() is used for those, too.


thanks,

Takashi

\
 
 \ /
  Last update: 2023-07-25 08:53    [W:5.892 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site