[lm-sensors] [PATCH 1/2] applesmc: Use PnP rather than hardcoding resources and devices
mjg59 at srcf.ucam.org
Fri Dec 17 22:57:08 CET 2010
On Thu, Dec 16, 2010 at 09:00:18AM -0800, Guenter Roeck wrote:
> I am having trouble applying this patch to my -next tree. The driver there
> (and in the official -next tree) has subtle differences to your version.
> What tree is your patch based on ? Can you rebase it to the -next tree and resubmit ?
My mistake - I'd pulled the patches from LKML, but it looks like there
was a later version of one or two.
> Couple of comments below; not necessarily complete, since I can not apply the patch.
> I hope Henrik can comment on the merits of the patch itself, ie if it is known to work
> with all systems.
> > +struct pnp_dev *pdev;
> > +struct applesmc_pnp_device *pnp_device;
> > +
> Please make those variables static.
> Just wondering ... applesmc_pnp_device doesn't seem to be necessary.
> Why not just use the global variable directly if you have it anyway ?
This ended up left over as part of an attempt to get rid of the
> > + pnp_set_drvdata(dev, applesmc_pnp_device);
> > +
> ... but then since you assign it to drvdata, can you get rid of the global variable
> and use pnp_get_drvdata() whereever it is needed instead ?
But then I ran into some awkward issue and decided to leave it. And then
failed to clean everything up. I'll repost without that.
Matthew Garrett | mjg59 at srcf.ucam.org
More information about the lm-sensors