All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mfd: mt6397: Add platform device ID table
Date: Thu, 11 Feb 2016 09:18:17 +0000	[thread overview]
Message-ID: <20160211091817.GE3782@x1> (raw)
In-Reply-To: <1455123018-25427-1-git-send-email-javier@osg.samsung.com>

On Wed, 10 Feb 2016, Javier Martinez Canillas wrote:

> The platform bus_type .match callback attempts to match the platform device
> name with an entry on the .id_table if provided and fallbacks to match with
> the driver's name if a table is not provided.
> 
> Using a platform device ID to match is more explicit, allows the driver to
> support more than one device and also the MODULE_DEVICE_TABLE macro can be
> used to export the module aliases information instead of the MODULE_ALIAS.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> ---
> 
> Changes in v2:
> - Insert spaces at both ends of curly braces. Suggested by Lee Jones.
> - Remove the sentinel comment from the NULL entry. Suggested by Lee Jones.
> 
>  drivers/mfd/mt6397-core.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Thanks for fixing.  Now applied.

> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 1749c1c9f405..41fe2ec2f92f 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -275,6 +275,12 @@ static const struct of_device_id mt6397_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, mt6397_of_match);
>  
> +static const struct platform_device_id mt6397_id[] = {
> +	{ "mt6397", 0 },
> +	{ },
> +};
> +MODULE_DEVICE_TABLE(platform, mt6397_id);
> +
>  static struct platform_driver mt6397_driver = {
>  	.probe = mt6397_probe,
>  	.remove = mt6397_remove,
> @@ -283,6 +289,7 @@ static struct platform_driver mt6397_driver = {
>  		.of_match_table = of_match_ptr(mt6397_of_match),
>  		.pm = &mt6397_pm_ops,
>  	},
> +	.id_table = mt6397_id,
>  };
>  
>  module_platform_driver(mt6397_driver);
> @@ -290,4 +297,3 @@ module_platform_driver(mt6397_driver);
>  MODULE_AUTHOR("Flora Fu, MediaTek");
>  MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC");
>  MODULE_LICENSE("GPL");
> -MODULE_ALIAS("platform:mt6397");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2016-02-11  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 16:50 [PATCH v2] mfd: mt6397: Add platform device ID table Javier Martinez Canillas
2016-02-11  9:18 ` Lee Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160211091817.GE3782@x1 \
    --to=lee.jones@linaro.org \
    --cc=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.