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: <20150324152458.GD4951@lukather>
Date:	Tue, 24 Mar 2015 08:24:58 -0700
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Thomas Niederprüm <niederp@...sik.uni-kl.de>
Cc:	plagnioj@...osoft.com, tomi.valkeinen@...com,
	kernel@...gutronix.de, shawn.guo@...aro.org, robh+dt@...nel.org,
	linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 04/10] fbdev: ssd1307fb: Unify init code and obtain hw
 specific bits from DT

On Fri, Mar 20, 2015 at 10:12:54PM +0100, Thomas Niederprüm wrote:
> > >  static const struct of_device_id ssd1307fb_of_match[] = {
> > >  	{
> > >  		.compatible = "solomon,ssd1306fb-i2c",
> > > -		.data = (void *)&ssd1307fb_ssd1306_ops,
> > > +		.data = (void *)&ssd1307fb_ssd1306_deviceinfo,
> > >  	},
> > >  	{
> > >  		.compatible = "solomon,ssd1307fb-i2c",
> > > -		.data = (void *)&ssd1307fb_ssd1307_ops,
> > > +		.data = (void *)&ssd1307fb_ssd1307_deviceinfo,
> > 
> > Do we need this ID? Wouldn't it make more sense to pass the pointer to
> > the struct we need to use?
> 
> Are you talking about the device_id inside the struct
> ssd1307_deviceinfo?

Yes.

> I need the device_id to serve special needs of the individual
> controllers during initialization. For example the ssd1307 needs to
> set up the pwm in the init code.

Then you can add a bool in the structure to say whether it needs a PWM
or not.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ