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);
+}
+
+#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.
True, let's leave it intact then.
S.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html