Re: [PATCH 1/4] wmi: add a pair of interfaces to set/get wmi driver data

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

 



On Sat, Apr 10, 2010 at 09:57:34AM +0200, Corentin Chary wrote:
> On Sat, Apr 10, 2010 at 9:35 AM, Carlos Corbacho
> <carlos@xxxxxxxxxxxxxxxxxxx> wrote:
> > On Saturday 10 April 2010 01:16:50 Yong Wang wrote:
> >> On Fri, Apr 09, 2010 at 08:11:07PM +0100, Carlos Corbacho wrote:
> >> > On Friday 09 April 2010 18:49:02 Dmitry Torokhov wrote:
> >> > > On Fri, Apr 09, 2010 at 11:03:20PM +0800, Yong Wang wrote:
> >> > > > Currently there is no easy way to associate driver data kind of thing
> >> > > > with wmi drivers thus global variables have to be used to pass that
> >> > > > information between functions. Add a pair of functions to support
> >> > > > that.
> >> >
> >> > NAK
> >> >
> >> > > It looks like once you compete the conversion and have platform device
> >> > > you can attach to it instead of needing driver data in WMI.
> >>
> >> The problem is that how can I retrieve the pointer to the platform device
> >> itself in eeepc_wmi_exit to platform_device_unregister it? Is there any
> >> other way to do it without having to define the platform device as
> >> global variable?
> >
> > I don't think so. But then why is this a problem, since this is what other
> > device drivers do?
> >
> > (The child devices of the platform driver could then be stored in the platform
> > devices data, if you wanted).
> 
> Maybe it's not that bad to get a static platform_device
> *platform_device; if we don't
> have the choice, then put eeepc_wmi in platform_device, and only use
> get_drvdata in
> platform_probe and eeepc_wmi_exit().
> 

OK, I will do it this way. Thanks to Carlos and Corentin for the
suggestion.

-Yong

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

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux