[media] media: gpio-ir-recv: add map name
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Mon, 18 Jun 2012 18:02:44 +0000 (15:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 25 Jun 2012 17:37:52 +0000 (14:37 -0300)
Make it possible for gpio-ir-recv users to choose a map name.

Cc: Ravi Kumar V <kumarrav@codeaurora.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/gpio-ir-recv.c
include/media/gpio-ir-recv.h

index b41e13c393cddb2f12f89d9ef04ed5a5d21c9e49..15e346e0bcd06d0b1a55ea492a897b97cf0d3929 100644 (file)
@@ -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;
index 67797bf5d432f6a648961c742d70ed1d008d0199..91546f35b7e1c928017d3be7d0e5600337c468ed 100644 (file)
@@ -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__ */