Re: [2.6 patch] drivers/media/video/: make code static

From: Olaf Hering
Date: Thu Dec 01 2005 - 14:47:57 EST


On Sun, Nov 20, Adrian Bunk wrote:

> drivers/media/video/cx25840/cx25840-core.c | 4 ++--

> --- linux-2.6.15-rc1-mm2-full/drivers/media/video/cx25840/cx25840-core.c.old 2005-11-20 02:55:12.000000000 +0100
> +++ linux-2.6.15-rc1-mm2-full/drivers/media/video/cx25840/cx25840-core.c 2005-11-20 02:55:23.000000000 +0100
> @@ -714,7 +714,7 @@
>
> /* ----------------------------------------------------------------------- */
>
> -struct i2c_driver i2c_driver_cx25840;
> +static struct i2c_driver i2c_driver_cx25840;
>
> static int cx25840_detect_client(struct i2c_adapter *adapter, int address,
> int kind)
> @@ -807,7 +807,7 @@
>
> /* ----------------------------------------------------------------------- */
>
> -struct i2c_driver i2c_driver_cx25840 = {
> +static struct i2c_driver i2c_driver_cx25840 = {
> .name = "cx25840",
>
> .id = I2C_DRIVERID_CX25840,

Why does it exist twice? Once uninitalized, once intialized? Appearently
I miss the point. I also dont find the place where ->command is called.

There are other problems with this driver. If VIDIOC_S_STD gets passed
to cx25840_command, set_v4lstd will get a 64bit value as second arg. gcc
for ppc generates calls to __ucmpdi2, from libgcc.
Only a few archs implement this function inside the kernel. Maybe this
driver should become arm/fvr/h8300 only in 2.6.15?

--
short story of a lazy sysadmin:
alias appserv=wotan
-
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/