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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130410075319.GN21818@intel.com>
Date:	Wed, 10 Apr 2013 10:53:19 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Mathias Nyman <mathias.nyman@...ux.intel.com>,
	grant.likely@...retlab.ca,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio / ACPI: Handle ACPI events in accordance with the
 spec

On Tue, Apr 09, 2013 at 03:57:25PM +0200, Rafael J. Wysocki wrote:
> +void acpi_gpiochip_free_interrupts(struct gpio_chip *chip)
> +{
> +	acpi_handle handle;
> +	acpi_status status;
> +	struct list_head *evt_pins;
> +	struct acpi_gpio_evt_pin *evt_pin, *ep;
> +
> +	if (!chip->dev || !chip->to_irq)
> +		return;
> +
> +	handle = ACPI_HANDLE(chip->dev);
> +	if (!handle)
> +		return;
> +
> +	status = acpi_get_data(handle, acpi_gpio_evt_dh, (void **)&evt_pins);
> +	if (ACPI_FAILURE(status))
> +		return;
> +
> +	list_for_each_entry_safe_reverse(evt_pin, ep, evt_pins, node) {
> +		devm_free_irq(chip->dev, evt_pin->irq, evt_pin);

How about using normal request/free_irq() functions for both _EVT and
non-_EVT events? Since we now need to call acpi_gpiochip_free_interrupts()
anyway, I don't see the point using devm_* functions here.

> +		list_del(&evt_pin->node);
> +		kfree(evt_pin);
> +	}
> +
> +	acpi_detach_data(handle, acpi_gpio_evt_dh);
> +	kfree(evt_pins);
> +}
> +EXPORT_SYMBOL(acpi_gpiochip_free_interrupts);
--
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