Re: [PATCH] drivers:input:set driver data to NULL for pcap_keys

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

 



On Tue, Jul 26, 2011 at 09:41:06AM -0700, Greg KH wrote:
> On Mon, Jul 25, 2011 at 11:45:20PM -0700, Dmitry Torokhov wrote:
> > On Tue, Jul 26, 2011 at 02:25:48PM +0800, Wanlong Gao wrote:
> > > On 07/26/2011 02:02 PM, Greg KH wrote:
> > > >On Tue, Jul 26, 2011 at 01:36:00PM +0800, Wanlong Gao wrote:
> > > >>On 07/26/2011 12:39 PM, Greg KH wrote:
> > > >>
> > > >>>>+
> > > >>>>+	if (drv->remove) {
> > > >>>>+		dev_dbg(_dev, "remove\n");
> > > >>>>+		status = drv->remove(dev);
> > > >>>>+	} else {
> > > >>>>+		status = 0;
> > > >>>>+	}
> > > >>>
> > > >>>Again, why would remove ever be NULL?
> > > >>>
> > > >>>This whole thing isn't needed at all.
> > > >>>
> > > >>>greg k-h
> > > >>Yeah, I see.
> > > >>
> > > >>But Greg, why does i2c-core do this?
> > > >>like:drivers/i2c/i2c-core.c:
> > > >
> > > >The i2c core has different requirements than the driver core does,
> > > >right?  They are two totally different things, please don't assume that
> > > >the rules for one are the same for the other.
> > > >
> > > >greg k-h
> > > >
> > > Hmm...They are totally different things, maybe I see..
> > 
> > Still, it would make sense to clean up platform device's drvdata
> > pointer, so that every platform driver out there does not have to do it
> > on its own.
> 
> Again, it shouldn't need to be "cleaned" up, as no one relies on it
> being there.

No one should rely on it being there however I came across quite a few
MFD patches that tried passing parent's data in that pointer. Hopefully
they are all cleaned now but we getting new drivers all the time...

If we had it in the platform bus code such uses would break even before
we get such drivers and we won't have to deal with them.

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux