Re: [PATCH] x86: fix unconditional arch/x86/kernel/pcspeaker.c compiling

From: Michael Opdenacker
Date: Fri Jan 18 2008 - 03:22:47 EST


On 01/18/2008 04:16 AM, Taral wrote:
> On 1/17/08, Michael Opdenacker <michael-lists@xxxxxxxxxxxxxxxxxx> wrote:
>
>> Another issue would be that we would no longer be able
>> to load the speaker driver module from a kernel which
>> wasn't originally compiled with support for this module.
>>
>
> Have you looked at pcspeaker.o? As far as I can tell, it does *nothing*.
>
Do you mean "almost nothing"? It still allocates and adds a platform
device, and the corresponding function always gets called at boot time.

I know that not compiling this piece of code just reduces the
uncompressed kernel size by just a few bytes (218). However, many small
contributions of this kind can have a significant impact on embedded
systems (or on boot media or on Linux based bootloaders).

As I said earlier, I'm starting to think that this trick should only be
used when CONFIG_EMBEDDED is set. In the non-embedded case, it's
probably not acceptable not to declare a platform device that is always
present in the system (while it's perfectly fine not to load the
corresponding driver).

Your comments and suggestions are more than welcome!

Michael.

--
Michael Opdenacker, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/