[media] via-camera: Fix OLPC serial check
authorDaniel Drake <dsd@laptop.org>
Thu, 3 Mar 2011 19:03:31 +0000 (16:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 22 Mar 2011 19:37:49 +0000 (16:37 -0300)
commitc6384c886dfed806f07ae2f8ba4d3740b57cde9c
tree610d83eb567490f465e86a3f2a1254a74ada8d4e
parent4a1cba5151ccddf4a7071fe4950fb699e8b23bf9
[media] via-camera: Fix OLPC serial check

The code that checks the OLPC serial port is never built at the moment,
because CONFIG_OLPC_XO_1_5 doesn't exist and probably won't be added.

Fix it so that it gets compiled in, only executes on OLPC laptops, and
move the check into the probe routine.

The compiler is smart enough to eliminate this code when CONFIG_OLPC=n
(due to machine_is_olpc() always returning false).

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/via-camera.c