On Tue, Aug 26, 2014 at 12:28 PM, Sonic Zhang <sonic.adi@xxxxxxxxx> wrote: > From: Sonic Zhang <sonic.zhang@xxxxxxxxxx> > > Device tree is not enabled in some archtecture where gpio driver mcp23s08 > is still required. > > Signed-off-by: Sonic Zhang <sonic.zhang@xxxxxxxxxx> > > v2-changes: > - Parse device tree properties into platform data other than individual variables. (...) > +#ifdef CONFIG_OF > mcp->irq_domain = irq_domain_add_linear(chip->of_node, chip->ngpio, > &irq_domain_simple_ops, mcp); > +#else > + mcp->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, > + &irq_domain_simple_ops, mcp); > +#endif Argh this doesn't look good. Cut the #ifdef and do this: mcp->irq_domain = irq_domain_add_linear(chip->dev->of_node, chip->ngpio, &irq_domain_simple_ops, mcp); Because the struct device * always has an of_node which is NULL when OF is not used. > /* configure ~100K pullups */ > - status = mcp->ops->write(mcp, MCP_GPPU, pullups); > + status = mcp->ops->write(mcp, MCP_GPPU, pdata->chip[cs].pullups); Extending a non-pincontrol pin control interface, grrr. Well I just have to live with it. Now how was it: is this driver impossible to convert to GPIOLIB_IRQCHIP? Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html