lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] LIS3LV02Dx Accelerometer driver (take 4)
Hi!

> Here is a submission for 2.6.28 of a driver for the ST LIS3LV02Dx
> accelerometer, a device found in various laptops (HP in particular) and
> embedded devices. It's the fourth iteration of what used to be called
> MDPS. I've now made the driver very simple, hoping to make it
> unobjectionable for acceptance :-)

Andrew, can you merge this one? It is simple enough, got some testing,
and can't really break anything...

Eric:

> +static int lis3lv02d_add(struct acpi_device *device)
> +{
> + u8 val;
> +
> + if (!device)
> + return -EINVAL;
> +
> + adev.device = device;
> + strcpy(acpi_device_name(device), DRIVER_NAME);
> + strcpy(acpi_device_class(device), ACPI_MDPS_CLASS);
> + acpi_driver_data(device) = &adev;

This one needs to be device->acpi_driver_data = , check -next.

> +/* For the HP MDPS aka 3D Driveguard */
> +static struct acpi_driver lis3lv02d_driver = {
> + .name = DRIVER_NAME,
> + .class = ACPI_MDPS_CLASS,
> + .ids = lis3lv02d_device_ids,
> + .ops = {
> + .add = lis3lv02d_add,
> + .remove = lis3lv02d_remove,
> +#ifdef CONFIG_PM
> + .suspend = lis3lv02d_suspend,
> + .resume = lis3lv02d_resume
> +#endif
> + }
> +};

This one is more nicely done by #defining _suspend/_resume to NULL,
IIRC.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-10-21 10:41    [W:0.143 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site