Re: [PATCH 01/11] Input: synaptics-rmi4 - embed the function modules in rmi_core

From: Paul Bolle
Date: Wed Jun 24 2015 - 05:51:21 EST


On Tue, 2015-06-23 at 15:17 -0400, Benjamin Tissoires wrote:
> drivers/input/rmi4/Kconfig | 5 +----
> drivers/input/rmi4/Makefile | 2 +-
> drivers/input/rmi4/rmi_bus.c | 11 ++++++++++-
> drivers/input/rmi4/rmi_driver.h | 8 ++++++++
> drivers/input/rmi4/rmi_f11.c | 10 +++++++++-
> 5 files changed, 29 insertions(+), 7 deletions(-)

(These files are neither in v4.1 nor in current linux-next. I have no
idea which tree this is for.)

> --- a/drivers/input/rmi4/Kconfig
> +++ b/drivers/input/rmi4/Kconfig

> config RMI4_F11
> - tristate "RMI4 Function 11 (2D pointing)"
> + bool "RMI4 Function 11 (2D pointing)"
> depends on RMI4_CORE
> help
> Say Y here if you want to add support for RMI4 function
> 11.

(Upgrading to Fedora 22 gave me evolution 3.16. And evolution now
somehow manages to screw up replies to long lines in patches!)

> --- a/drivers/input/rmi4/rmi_f11.c
> +++ b/drivers/input/rmi4/rmi_f11.c
> @@ -1537,7 +1537,15 @@ static struct rmi_function_handler
> rmi_f11_handler = {
> .attention = rmi_f11_attention,
> };
>
> -module_rmi_driver(rmi_f11_handler);
> +int __init rmi_register_f11_handler(void)
> +{
> + return rmi_register_function_handler(&rmi_f11_handler);
> +}
> +
> +void rmi_unregister_f11_handler(void)
> +{
> + rmi_unregister_function_handler(&rmi_f11_handler);
> +}
>
> MODULE_AUTHOR("Christopher Heiny <cheiny@xxxxxxxxxxxxx");
> MODULE_AUTHOR("Andrew Duggan <aduggan@xxxxxxxxxxxxx");

You can remove these macros too. And whatever module specific code or
macros there still might be left in this file.

Thanks,


Paul Bolle
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/