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() ?
#define gpio_ir_recv_get_devtree_pdata (-ENOSYS)+{
+ return ERR_PTR(-ENODEV);
+}
+
+#endif
+
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)
pdev->dev.platform_data;
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
with
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
gpio_ir_recv_get_devtree_pdata()
but it is almost the same amount of code.. and it is cleaner this way.