All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Alexander Holler <holler@ahsoftware.de>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
	Jonathan Cameron <jic23@cam.ac.uk>,
	Srinivas Pandruvada <srinivas.pandruvada@intel.com>
Subject: Re: [PATCH 3/4] iio: hid-sensor-als: add module alias for autoload
Date: Fri, 12 Jul 2013 14:49:41 -0700	[thread overview]
Message-ID: <51E079F5.50303@linux.intel.com> (raw)
In-Reply-To: <1373445120-5407-4-git-send-email-holler@ahsoftware.de>

Tested. You can add my ack.

Acked-by:Srinivas Pandruvada<srinivas.pandruvada@linux.intel.com>


On 07/10/2013 01:31 AM, Alexander Holler wrote:
> Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
> load the driver.
>
> This makes it also possible to use the usual driver name instead of
> HID-SENSOR-2000xx which isn't very descriptive in kernel messages.
>
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
>   drivers/iio/light/hid-sensor-als.c | 16 +++++++++++-----
>   1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
> index cdc2cad..9adfef0 100644
> --- a/drivers/iio/light/hid-sensor-als.c
> +++ b/drivers/iio/light/hid-sensor-als.c
> @@ -30,10 +30,6 @@
>   #include <linux/iio/triggered_buffer.h>
>   #include "../common/hid-sensors/hid-sensor-trigger.h"
>   
> -/*Format: HID-SENSOR-usage_id_in_hex*/
> -/*Usage ID from spec for Ambiant-Light: 0x200041*/
> -#define DRIVER_NAME "HID-SENSOR-200041"
> -
>   #define CHANNEL_SCAN_INDEX_ILLUM 0
>   
>   struct als_state {
> @@ -355,9 +351,19 @@ static int hid_als_remove(struct platform_device *pdev)
>   	return 0;
>   }
>   
> +static struct platform_device_id hid_als_ids[] = {
> +	{
> +		/* Format: HID-SENSOR-usage_id_in_hex_lowercase */
> +		.name = "HID-SENSOR-200041",
> +	},
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(platform, hid_als_ids);
> +
>   static struct platform_driver hid_als_platform_driver = {
> +	.id_table = hid_als_ids,
>   	.driver = {
> -		.name	= DRIVER_NAME,
> +		.name	= KBUILD_MODNAME,
>   		.owner	= THIS_MODULE,
>   	},
>   	.probe		= hid_als_probe,


  reply	other threads:[~2013-07-12 21:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  8:31 [PATCH 0/4] iio: hid-sensor: add module alias for autoload Alexander Holler
2013-07-10  8:31 ` [PATCH 1/4] iio: hid-sensor-accel-3d: " Alexander Holler
2013-07-10  8:31 ` [PATCH 2/4] iio: hid-sensor-gyro-3d: " Alexander Holler
2013-07-12 21:49   ` Srinivas Pandruvada
2013-07-10  8:31 ` [PATCH 3/4] iio: hid-sensor-als: " Alexander Holler
2013-07-12 21:49   ` Srinivas Pandruvada [this message]
2013-07-10  8:32 ` [PATCH 4/4] iio: hid-sensor-magn-3d: " Alexander Holler
2013-07-12 21:49   ` Srinivas Pandruvada
2013-07-10 15:27 ` [PATCH 0/4] iio: hid-sensor: " Srinivas Pandruvada
2013-07-10 15:58   ` Alexander Holler
2013-07-11 17:27     ` Srinivas Pandruvada
2013-07-12  7:21       ` Alexander Holler
2013-07-12 18:44         ` Jonathan Cameron
2013-07-12 18:46           ` Pandruvada, Srinivas
2013-07-12 21:46           ` Pandruvada, Srinivas
2013-07-13 13:29             ` Jonathan Cameron

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=51E079F5.50303@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=holler@ahsoftware.de \
    --cc=jic23@cam.ac.uk \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    /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.