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 4/4] iio: hid-sensor-magn-3d: add module alias for autoload
Date: Fri, 12 Jul 2013 14:49:56 -0700 [thread overview]
Message-ID: <51E07A04.20705@linux.intel.com> (raw)
In-Reply-To: <1373445120-5407-5-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:32 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/magnetometer/hid-sensor-magn-3d.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> index 99f4e49..e71127a 100644
> --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
> +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.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 Magnetometer-3D: 0x200083*/
> -#define DRIVER_NAME "HID-SENSOR-200083"
> -
> enum magn_3d_channel {
> CHANNEL_SCAN_INDEX_X,
> CHANNEL_SCAN_INDEX_Y,
> @@ -390,9 +386,19 @@ static int hid_magn_3d_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static struct platform_device_id hid_magn_3d_ids[] = {
> + {
> + /* Format: HID-SENSOR-usage_id_in_hex_lowercase */
> + .name = "HID-SENSOR-200083",
> + },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(platform, hid_magn_3d_ids);
> +
> static struct platform_driver hid_magn_3d_platform_driver = {
> + .id_table = hid_magn_3d_ids,
> .driver = {
> - .name = DRIVER_NAME,
> + .name = KBUILD_MODNAME,
> .owner = THIS_MODULE,
> },
> .probe = hid_magn_3d_probe,
next prev parent 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
2013-07-10 8:32 ` [PATCH 4/4] iio: hid-sensor-magn-3d: " Alexander Holler
2013-07-12 21:49 ` Srinivas Pandruvada [this message]
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=51E07A04.20705@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.