]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commita6d92f7a2d684bcb287e3471a55b11556b68aa76
tree610d83eb567490f465e86a3f2a1254a74ada8d4e
parentd3d536aae857e0d606a83a9d32082bf07588be3c
[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