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:	Fri, 11 Oct 2013 16:38:33 -0700
From:	Tony Lindgren <tony@...mide.com>
To:	Sebastian Reichel <sre@...ian.org>
Cc:	Sebastian Reichel <sre@...g0.de>, linux-input@...r.kernel.org,
	'BenoƮt Cousson' <bcousson@...libre.com>,
	Rob Herring <rob.herring@...xeda.com>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Stephen Warren <swarren@...dotorg.org>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Rob Landley <rob@...dley.net>,
	Russell King <linux@....linux.org.uk>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-omap@...r.kernel.org
Subject: Re: [PATCH 1/2] Input: twl4030_keypad - add device tree support

* Sebastian Reichel <sre@...ian.org> [131009 14:25]:
> Add device tree support for twl4030 keypad driver and update the
> Documentation with twl4030 keypad device tree binding information.
> 
> This patch also adds a twl4030 keypad node to the twl4030.dtsi file,
> so that board files can just add the keymap.
> 
> Tested on Nokia N900.

Nice :) Just few cosmetic comments below.
>  
> +#ifdef CONFIG_OF
> +static int twl4030_keypad_parse_dt(struct device *dev,
> +				 struct twl4030_keypad *keypad_data)
> +{

I guess the way to go nowadays is to use #IS_ENABLED(CONFIG_OF) here
and later on in this patch.

> @@ -331,20 +358,12 @@ static int twl4030_kp_program(struct twl4030_keypad *kp)
>  static int twl4030_kp_probe(struct platform_device *pdev)
>  {
>  	struct twl4030_keypad_data *pdata = pdev->dev.platform_data;
> -	const struct matrix_keymap_data *keymap_data;
> +	const struct matrix_keymap_data *keymap_data = NULL;
>  	struct twl4030_keypad *kp;
>  	struct input_dev *input;
>  	u8 reg;
>  	int error;
>  
> -	if (!pdata || !pdata->rows || !pdata->cols || !pdata->keymap_data ||
> -	    pdata->rows > TWL4030_MAX_ROWS || pdata->cols > TWL4030_MAX_COLS) {
> -		dev_err(&pdev->dev, "Invalid platform_data\n");
> -		return -EINVAL;
> -	}
> -
> -	keymap_data = pdata->keymap_data;
> -
>  	kp = kzalloc(sizeof(*kp), GFP_KERNEL);
>  	input = input_allocate_device();
>  	if (!kp || !input) {

I assume you have tested the above so it does not break things
for legacy booting?

Other than that:

Acked-by: Tony Lindgren <tony@...mide.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