From: Benoît Thébaudeau Date: Mon, 18 Jun 2012 18:02:44 +0000 (-0300) Subject: [media] media: gpio-ir-recv: add map name X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2bd237b8a45eb107d6304496fbd5b4a34471fbd3;p=openwrt%2Fstaging%2Fblogic.git [media] media: gpio-ir-recv: add map name Make it possible for gpio-ir-recv users to choose a map name. Cc: Ravi Kumar V Signed-off-by: Benoît Thébaudeau Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index b41e13c393cd..15e346e0bcd0 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -93,7 +93,7 @@ static int __devinit gpio_ir_recv_probe(struct platform_device *pdev) rcdev->input_id.version = 0x0100; rcdev->dev.parent = &pdev->dev; rcdev->driver_name = GPIO_IR_DRIVER_NAME; - rcdev->map_name = RC_MAP_EMPTY; + rcdev->map_name = pdata->map_name ?: RC_MAP_EMPTY; gpio_dev->rcdev = rcdev; gpio_dev->gpio_nr = pdata->gpio_nr; diff --git a/include/media/gpio-ir-recv.h b/include/media/gpio-ir-recv.h index 67797bf5d432..91546f35b7e1 100644 --- a/include/media/gpio-ir-recv.h +++ b/include/media/gpio-ir-recv.h @@ -16,6 +16,7 @@ struct gpio_ir_recv_platform_data { int gpio_nr; bool active_low; + const char *map_name; }; #endif /* __GPIO_IR_RECV_H__ */