Re: 2.6.1-mm4

Andrew Morton
2004-01-16T17:03:49Z

Fabian Fenaut <fabian.fenaut@free.fr> wrote:
>
> I got an error compiling -mm4 :
>
> [...]
> CC [M] drivers/media/video/ir-kbd-gpio.o
> drivers/media/video/ir-kbd-gpio.c:185: unknown field `name' specified in
> initializer
> drivers/media/video/ir-kbd-gpio.c:185: warning: missing braces around
> initializer
> drivers/media/video/ir-kbd-gpio.c:185: warning: (near initialization for
> `driver.drv')
> drivers/media/video/ir-kbd-gpio.c:186: unknown field `drv' specified in
> initializer
> drivers/media/video/ir-kbd-gpio.c:187: unknown field `drv' specified in
> initializer
> drivers/media/video/ir-kbd-gpio.c:188: unknown field `gpio_irq'
> specified in initializer

You must be using an elderly gcc.

diff -puN drivers/media/video/ir-kbd-gpio.c~ir-kbd-gpio-build-fix drivers/media/video/ir-kbd-gpio.c
--- 25/drivers/media/video/ir-kbd-gpio.c~ir-kbd-gpio-build-fix 2004-01-16 09:01:59.000000000 -0800
+++ 25-akpm/drivers/media/video/ir-kbd-gpio.c 2004-01-16 09:02:17.000000000 -0800
@@ -182,9 +182,11 @@ static int ir_probe(struct device *dev);
static int ir_remove(struct device *dev);

static struct bttv_sub_driver driver = {
- .drv.name = DEVNAME,
- .drv.probe = ir_probe,
- .drv.remove = ir_remove,
+ .drv = {
+ .name = DEVNAME,
+ .probe = ir_probe,
+ .remove = ir_remove,
+ },
.gpio_irq = ir_irq,
};

_