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]
Message-ID: <20150203193835.GC20256@dtor-ws>
Date:	Tue, 3 Feb 2015 11:38:35 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Roman Volkov <v1ron@...os.org>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Grant Likely <grant.likely@...aro.org>,
	Hans de Goede <hdegoede@...hat.com>,
	Jiri Kosina <jkosina@...e.cz>,
	Wolfram Sang <wsa@...-dreams.de>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	Roman Volkov <v1ron@...l.ru>,
	Tony Prisk <linux@...sktech.co.nz>
Subject: Re: [PATCH 4/5] i8042: Prepare i8042 driver for DT support

On Tue, Feb 03, 2015 at 12:48:49AM +0300, Roman Volkov wrote:
> Use platform_device_probe() instead of platform_create_bundle() when
> compiled with DT support, since the latter function is not suitable for
> handling the OF device tree.
> 
> The order of initialization is changed, since i8042_platform_init() for DT
> requires initialized platform_device structure. To avoid searching of the
> compatible node twice, the platform_device structure pointer must be passed
> to the i8042_platform_init() function right after initialization by
> platform_device_probe().
> 
> Signed-off-by: Tony Prisk <linux@...sktech.co.nz>
> Signed-off-by: Roman Volkov <v1ron@...os.org>
> ---
> 
> Yes, many of these ifdefs look ugly. Suggestions on how to avoid this are
> welcome (except using of_find_compatible_node() for searching the node twice
> before calling the probe function).

I guess we need to split the dirver into part that create platform
device and the standard driver part. Then your OF code can supply most
of the needed data via resources/platform data. Yes, it is a larger
change, but the current splat of ifdefs makes my eyes water.

Thanks.

-- 
Dmitry
--
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