Re: [PATCH v2] media: rc: gpio-ir-recv: add support for device treeparsing

From: Sylwester Nawrocki
Date: Fri Feb 08 2013 - 16:52:42 EST

On 02/08/2013 10:36 PM, Sebastian Hesselbarth wrote:
You could also make it:

#define gpio_ir_recv_get_devtree_pdata (-ENOSYS)

Hmm, does that also play with parameter passing of the
CONFIG_OF gpio_ir_recv_get_devtree_pdata() ?

Oops, should have been:

#define gpio_ir_recv_get_devtree_pdata(dev, pd) (-ENOSYS)

#define gpio_ir_recv_get_devtree_pdata (-ENOSYS)
+ return ERR_PTR(-ENODEV);
static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
struct gpio_rc_dev *gpio_dev = dev_id;
@@ -66,6 +111,17 @@ static int gpio_ir_recv_probe(struct
platform_device *pdev)
int rc;

+ if (pdev->dev.of_node) {
+ struct gpio_ir_recv_platform_data *dtpdata =

I think you could use pdata here instead, as previously. But I'm fine
as it is now as well.

Yeah, but pdata is const and I will change it within _get_devtree_pdata().
I could cast the const away when passing it to
but it is almost the same amount of code.. and it is cleaner this way.

True, let's leave it intact then.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at