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]
Date:	Mon, 02 Mar 2009 15:34:43 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Hans-Christian Egtvedt <hcegtvedt@...el.com>
Subject: Re: [PATCH 2/2] Input: add wm97xx accelerated driver for AVR32 AT32AP700X
 microprocessors

> --- /dev/null
> +++ b/drivers/input/touchscreen/at32-wm97xx.c
> +static void at32_wm97xx_pen_timer(unsigned long data)

Wouldn't be delayed_work more appropriate (and convenient) here?

> +{
> +	struct at32_wm97xx *at32_wm97xx = (struct at32_wm97xx *)data;
> +	struct wm97xx *wm = at32_wm97xx->wm;
> +	int pen_down = gpio_get_value(at32_wm97xx->gpio_pen);
> +
> +	if (pen_down != 0) {
> +		mod_timer(&at32_wm97xx->pen_timer, jiffies
> +				+ msecs_to_jiffies(1));
> +	} else {
> +		input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
> +		input_sync(wm->input_dev);
> +	}
> +}

> +static int __init at32_wm97xx_probe(struct platform_device *pdev)
> +{
[...]
> +	at32_wm97xx->regs	= (void *)AT32_WM97XX_AC97C_IOMEM;

(void __iomem *)?
Did you feed it through sparse?

> +	ret = request_irq(at32_wm97xx->ac97c_irq,
> +			at32_wm97xx_channel_b_interrupt,
> +			IRQF_SHARED, "at32-wm97xx-ch-b", at32_wm97xx);
[...]
> +	return wm97xx_register_mach_ops(wm,&at32_mach_ops);

In case it fails, irq remains set up.

> +#ifdef CONFIG_PM
> +static int at32_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
> +{
> +	struct at32_wm97xx *at32_wm97xx = platform_get_drvdata(pdev);
> +
> +	ac97c_writel(at32_wm97xx, IDR, AC97C_INT_CBEVT);
> +	disable_irq(at32_wm97xx->gpio_irq);

Here, you should call disable_irq_sync() (that's what I meant by _sync 
in the last post).
--
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