Re: [PATCH 1/2] ACPI / LPSS: Make condition local to lpt_register_clock_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, March 20, 2013 02:14:29 PM Andy Shevchenko wrote:
> It seems more logical to have the check of lpss_clk_dev variable in
> lpt_register_clock_device() because last one actually assignes the variable.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Actually, I came to the opposite conclusion when I was working on the code
in question. :-)

Not applied.

Thanks,
Rafael


> ---
>  drivers/acpi/acpi_lpss.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
> index c87db0e..c695841 100644
> --- a/drivers/acpi/acpi_lpss.c
> +++ b/drivers/acpi/acpi_lpss.c
> @@ -84,6 +84,9 @@ static struct platform_device *lpss_clk_dev;
>  
>  static inline void lpt_register_clock_device(void)
>  {
> +	if (lpss_clk_dev)
> +		return;
> +
>  	lpss_clk_dev = platform_device_register_simple("clk-lpt", -1, NULL, 0);
>  }
>  
> @@ -92,8 +95,7 @@ static int register_device_clock(struct acpi_device *adev,
>  {
>  	const struct lpss_device_desc *dev_desc = pdata->dev_desc;
>  
> -	if (!lpss_clk_dev)
> -		lpt_register_clock_device();
> +	lpt_register_clock_device();
>  
>  	if (!dev_desc->clk_parent || !pdata->mmio_base
>  	    || pdata->mmio_size < dev_desc->prv_offset + LPSS_CLK_SIZE)
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux