Il 28/06/2011 11:27, Mattia Dongili ha scritto:


Marco Chiappero<[email protected]>  wrote:

Il 13/06/2011 02:01, Marco Chiappero ha scritto:
Il 13/06/2011 00:21, Mattia Dongili ha scritto:
+static int sony_nc_snc_setup(struct platform_device *pd)

To be honest these sony_nc_snc_* functions are a bit poorly named.
sony_nc_ was already supposed to be a partial expansion of SNC so
this
whole thing is a bit redundant now. what about
sony_nc_setup/sony_nc_cleanup?

Yes I know but in the hurry I forgot to think about that, I will use
this new naming schema.

I've been rethinking about this, I was rather unhappy with the
sony_nc_snc_setup_handles and sony_nc_handles_setup names. I think that

the best solution is:
- to rename sony_nc_handles_setup to sony_nc_handles_list_setup

This:
- to include the sony_nc_setup_handles code back to sony_nc_snc_setup

should be enough to disambiguate without gratuitously renaming all the other 
functions.

Yeah, but there are two issues:
1) sony_nc_add/resume/remove/notify are the ACPI callbacks that deal with the whole SNC stuff, while the sony_nc_setup/cleanup functions deal with the sole handles init and cleanup stuff. IMHO, this adds confusion.
2) we need an handles resume function but sony_nc_resume is already present.

Moreover the sony_nc_handles_list_* schema is much better and meaningful since those functions are related to the handles list.

so:
1) sony_nc_handles_* to sony_nc_handles_list_* --> handles list stuff
2) sony_nc_handles_* --> functions dealing with the handles setup/cleanup/resume stuff called from sony_nc_add/remove/resume (ACPI callbacks)

To get a better idea, have a look at this modified source, using the naming schema I'm proposing: http://www.absence.it/vaio-acpi/source/sony-laptop_dev_28062011.c
Hope this helps.

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

Reply via email to