Re: [PATCH] via-camera: fix OLPC serial port check

2010-10-28 Thread Jonathan Corbet
On Thu, 28 Oct 2010 20:14:35 +0100 Daniel Drake wrote: > I think the compiler might be smart enough to optimize it out. > When CONFIG_OLPC=n, machine_is_olpc() compiles down to a simple "no". > Hopefully that then makes all of that code candidate for dead code > elimination by the compiler. Ah,

Re: [PATCH] via-camera: fix OLPC serial port check

2010-10-28 Thread Daniel Drake
On 28 October 2010 20:08, Jonathan Corbet wrote: > This makes every user carry a bit of OLPC-specific code.  But there are > no non-OLPC users currently, the code is small, and we get rid of some > #ifdefs, which is always a good thing.  Seems good to me. I think the compiler might be smart enoug

Re: [PATCH] via-camera: fix OLPC serial port check

2010-10-28 Thread Jonathan Corbet
On Wed, 27 Oct 2010 20:02:28 +0100 (BST) Daniel Drake wrote: > CONFIG_OLPC_XO_1_5 does not exist in mainline, and it's not certain that > we'll find a reason to add it later. > > We should also be detecting this at runtime, and if we do it at probe > time we can be sure not to mess around with t

[PATCH] via-camera: fix OLPC serial port check

2010-10-27 Thread Daniel Drake
CONFIG_OLPC_XO_1_5 does not exist in mainline, and it's not certain that we'll find a reason to add it later. We should also be detecting this at runtime, and if we do it at probe time we can be sure not to mess around with the PCI config space on XO-1. viafb already depends on X86 so there won't