Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228302

Re: [PATCH 1/1] toshiba_acpi: Remove unneeded u32 variables from *setup_keyboard

From Darren Hart <dvhart@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] toshiba_acpi: Remove unneeded u32 variables from *setup_keyboard
Date 2015-09-18 23:50 +0200
Message-ID <qabHz-6x4-9@gated-at.bofh.it> (permalink)
References <q6RvI-1rs-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 09, 2015 at 11:30:08AM -0600, Azael Avalos wrote:
> The function toshiba_acpi_setup_keyboard currently has two u32 variables
> used to store the Hotkey Event Type and the result of the HCI_SYSTEM_EVENT
> query.
> 
> This patch removes those two variables, as we already have a global
> variable named "hotkey_event_type" and the result of the HCI_SYSTEM_EVENT
> query can be checked directly from the function.
> 
> Signed-off-by: Azael Avalos <coproscefalo@gmail.com>

...

>  		goto err_free_dev;
> @@ -2443,12 +2440,10 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
>  	 * Determine hotkey query interface. Prefer using the INFO
>  	 * method when it is available.
>  	 */
> -	if (acpi_has_method(dev->acpi_dev->handle, "INFO"))
> +	if (acpi_has_method(dev->acpi_dev->handle, "INFO")) {
>  		dev->info_supported = 1;
> -	else {
> -		hci_result = hci_write(dev, HCI_SYSTEM_EVENT, 1);
> -		if (hci_result == TOS_SUCCESS)
> -			dev->system_event_supported = 1;
> +	} else if (hci_write(dev, HCI_SYSTEM_EVENT, 1) == TOS_SUCCESS)

Ahem.

Missing the brace at the end and wreaking havoc on the poor compiler!

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] toshiba_acpi: Remove unneeded u32 variables from *setup_keyboard Azael Avalos <coproscefalo@gmail.com> - 2015-09-09 19:40 +0200
  [PATCH] platform/x86: Toshiba WMI Hotkey Driver Azael Avalos <coproscefalo@gmail.com> - 2015-09-09 19:40 +0200
    Re: [PATCH] platform/x86: Toshiba WMI Hotkey Driver Darren Hart <dvhart@infradead.org> - 2015-09-19 00:00 +0200
      Re: [PATCH] platform/x86: Toshiba WMI Hotkey Driver Azael Avalos <coproscefalo@gmail.com> - 2015-09-19 06:30 +0200
      Re: [PATCH] platform/x86: Toshiba WMI Hotkey Driver Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-09-19 18:50 +0200
  Re: [PATCH 1/1] toshiba_acpi: Remove unneeded u32 variables from  *setup_keyboard Darren Hart <dvhart@infradead.org> - 2015-09-18 23:50 +0200

csiph-web