lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1340969993.24166.2.camel@Nokia-N900>
Date:	Fri, 29 Jun 2012 08:39:53 -0300
From:	Thadeu Cascardo <cascardo@...oscopio.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux PM list <linux-pm@...r.kernel.org>
Cc:	ACPI Devel Mailing List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, Len Brown <lenb@...nel.org>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	platform-driver-x86@...r.kernel.org,
	Eric Piel <eric.piel@...mplin-utc.net>,
	Mattia Dongili <malattia@...ux.it>,
	Harald Welte <laforge@...monks.org>,
	Daniel Oliveira Nascimento <don@...t.com.br>
Subject: Re: [PATCH missing/21] classmate-laptop: Use struct dev_pm_ops for
	power management

----- Original message -----
> From: Rafael J. Wysocki <rjw@...k.pl>
> 
> Make the classmate-laptop driver define its PM callbacks through
> a struct dev_pm_ops object rather than by using legacy PM hooks
> in struct acpi_device_ops.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> ---
> 
> Hi all,
> 
> I overlooked the classmate-laptop driver in the ACPI conversion to PM
> handling based on struct dev_pm_ops, so this one should go after [17/21]
> and the next patches should be renumbered.
> 
> Thanks,
> Rafael
> 
> 
> ---
>   drivers/platform/x86/classmate-laptop.c |     13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
> 
> Index: linux/drivers/platform/x86/classmate-laptop.c
> ===================================================================
> --- linux.orig/drivers/platform/x86/classmate-laptop.c
> +++ linux/drivers/platform/x86/classmate-laptop.c
> @@ -362,15 +362,18 @@ static int cmpc_tablet_remove(struct acp
>       return cmpc_remove_acpi_notify_device(acpi);
>   }
>   
> -static int cmpc_tablet_resume(struct acpi_device *acpi)
> +static int cmpc_tablet_resume(struct device *dev)
>   {
> -    struct input_dev *inputdev = dev_get_drvdata(&acpi->dev);
> +    struct input_dev *inputdev = dev_get_drvdata(dev);
> +
>       unsigned long long val = 0;
> -    if (ACPI_SUCCESS(cmpc_get_tablet(acpi->handle, &val)))
> +    if (ACPI_SUCCESS(cmpc_get_tablet(to_acpi_device(dev)->handle, &val)))
>           input_report_switch(inputdev, SW_TABLET_MODE, !val);
>       return 0;
>   }
>   
> +static SIMPLE_DEV_PM_OPS(cmpc_tabled_pm, NULL, cmpc_tablet_resume);
> +
>   static const struct acpi_device_id cmpc_tablet_device_ids[] = {
>       {CMPC_TABLET_HID, 0},
>       {"", 0}
> @@ -384,9 +387,9 @@ static struct acpi_driver cmpc_tablet_ac
>       .ops = {
>           .add = cmpc_tablet_add,
>           .remove = cmpc_tablet_remove,
> -        .resume = cmpc_tablet_resume,
>           .notify = cmpc_tablet_handler,
> -    }
> +    },
> +    .drv.pm = &cmpc_tabled_pm,
>   };
>   
>   

Aside from the typo tabled,

Acked-by: Thadeu Lima de Souza Cascardo <cascardo@...oscopio.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ