Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1681145 > unrolled thread

Re: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus

Started byRobert Jarzmik <robert.jarzmik@free.fr>
First post2017-07-04 21:40 +0200
Last post2017-07-05 22:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus Robert Jarzmik <robert.jarzmik@free.fr> - 2017-07-04 21:40 +0200
    Re: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus Takashi Iwai <tiwai@suse.de> - 2017-07-04 22:20 +0200
      Re: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus Robert Jarzmik <robert.jarzmik@free.fr> - 2017-07-05 22:30 +0200

#1681145 — Re: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2017-07-04 21:40 +0200
SubjectRe: [PATCH v3 02/12] ALSA: ac97: add an ac97 bus
Message-ID<tZBPY-4mq-11@gated-at.bofh.it>
Takashi Iwai <tiwai@suse.de> writes:

> On Fri, 30 Jun 2017 21:43:58 +0200,
> Robert Jarzmik wrote:
>> +static struct bus_type ac97_bus_type = {
>> +	.name		= "ac97",
>
> Name-conflict with the old ac97 bus?
Yeah, fair point. So what should I choose for this new one ?
 - ac97new
 - ac97bis
 - ac97_2
 - ac97reborn

>> +static int __init ac97_bus_init(void)
>> +{
>> +	return bus_register(&ac97_bus_type);
>> +}
>> +subsys_initcall(ac97_bus_init);
>> +
>> +MODULE_LICENSE("GPL");
>> +MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
>
> No bus_unregister() at exit?
Mmmh, that's because I used subsys_initcall(), which doesn't look good in a
module compilation setup. That will require a module_init(), and I will think
about how to implement it and test it for next iteration.

Cheers.

-- 
Robert

[toc] | [next] | [standalone]


#1681167

FromTakashi Iwai <tiwai@suse.de>
Date2017-07-04 22:20 +0200
Message-ID<tZCsF-4Pa-5@gated-at.bofh.it>
In reply to#1681145
On Tue, 04 Jul 2017 21:37:48 +0200,
Robert Jarzmik wrote:
> 
> Takashi Iwai <tiwai@suse.de> writes:
> 
> > On Fri, 30 Jun 2017 21:43:58 +0200,
> > Robert Jarzmik wrote:
> >> +static struct bus_type ac97_bus_type = {
> >> +	.name		= "ac97",
> >
> > Name-conflict with the old ac97 bus?
> Yeah, fair point. So what should I choose for this new one ?
>  - ac97new
>  - ac97bis
>  - ac97_2
>  - ac97reborn

ac97bus
ac97_episode_5
ac98
...

I have no opinion on it.


> >> +static int __init ac97_bus_init(void)
> >> +{
> >> +	return bus_register(&ac97_bus_type);
> >> +}
> >> +subsys_initcall(ac97_bus_init);
> >> +
> >> +MODULE_LICENSE("GPL");
> >> +MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
> >
> > No bus_unregister() at exit?
> Mmmh, that's because I used subsys_initcall(), which doesn't look good in a
> module compilation setup. That will require a module_init(), and I will think
> about how to implement it and test it for next iteration.

You can use subsys_init() for modules, it's no problem.
When it's built for a module, all xxx_init() is handled as equivalent
with module_init().  See linux/module.h.

It's just the lack of module_exit() in your case.


thanks,

Takashi

[toc] | [prev] | [next] | [standalone]


#1681778

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2017-07-05 22:30 +0200
Message-ID<tZZ5U-2Lm-7@gated-at.bofh.it>
In reply to#1681167
Takashi Iwai <tiwai@suse.de> writes:

> On Tue, 04 Jul 2017 21:37:48 +0200,
> Robert Jarzmik wrote:
>> 
>> Takashi Iwai <tiwai@suse.de> writes:
>> 
>> > On Fri, 30 Jun 2017 21:43:58 +0200,
>> > Robert Jarzmik wrote:
>> >> +static struct bus_type ac97_bus_type = {
>> >> +	.name		= "ac97",
>> >
>> > Name-conflict with the old ac97 bus?
>> Yeah, fair point. So what should I choose for this new one ?
>>  - ac97new
>>  - ac97bis
>>  - ac97_2
>>  - ac97reborn
>
> ac97bus
> ac97_episode_5
> ac98
> ...
>
> I have no opinion on it.
Ah clone wars one is really tempting :)
But let's have ac97bus actually.

> You can use subsys_init() for modules, it's no problem.
> When it's built for a module, all xxx_init() is handled as equivalent
> with module_init().  See linux/module.h.
>
> It's just the lack of module_exit() in your case.
Got it, I'll add it for v4.

Cheers.

-- 
Robert

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web