Re: [PATCH] mfd: twl6030-irq: Revert to use of_match_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Nov 2023, Lee Jones wrote:

> On Sun, 29 Oct 2023, Peter Ujfalusi wrote:
> 
> > The core twl chip is probed via i2c and the dev->driver->of_match_table is
> > NULL, causing the driver to fail to probe.
> > 
> > This partially reverts commit 1e0c866887f4.
> > 
> > Fixes: 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers")
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>
> > ---
> >  drivers/mfd/twl6030-irq.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
> > index f9fce8408c2c..3c03681c124c 100644
> > --- a/drivers/mfd/twl6030-irq.c
> > +++ b/drivers/mfd/twl6030-irq.c
> > @@ -24,10 +24,10 @@
> >  #include <linux/kthread.h>
> >  #include <linux/mfd/twl.h>
> >  #include <linux/platform_device.h>
> > -#include <linux/property.h>
> >  #include <linux/suspend.h>
> >  #include <linux/of.h>
> >  #include <linux/irqdomain.h>
> > +#include <linux/of_device.h>
> >  
> >  #include "twl-core.h"
> >  
> > @@ -368,10 +368,10 @@ int twl6030_init_irq(struct device *dev, int irq_num)
> >  	int			nr_irqs;
> >  	int			status;
> >  	u8			mask[3];
> > -	const int		*irq_tbl;
> > +	const struct of_device_id *of_id;
> >  
> > -	irq_tbl = device_get_match_data(dev);
> > -	if (!irq_tbl) {
> > +	of_id = of_match_device(twl6030_of_match, dev);
> 
> I think you just dropped support for ACPI.

Ah, scrap that.  I was looking at the wrong part of 1e0c866887f4.

So what about the other drivers changed in the aforementioned commit?

Ideally we'd have a call that covers all of the various probing APIs.

> Rob, care to follow-up?

I'd still like Rob to comment.

-- 
Lee Jones [李琼斯]




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux