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: <20090227154220.7099f339.akpm@linux-foundation.org>
Date:	Fri, 27 Feb 2009 15:42:20 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Brownell <david-b@...bell.net>
Cc:	me@...ipebalbi.com, linux-kernel@...r.kernel.org,
	linux-input@...r.kernel.org, felipe.balbi@...ia.com,
	sameo@...nedhand.com
Subject: Re: [PATCH 2/2] mfd: twl4030: add twl4030-pwrbutton as our child

On Fri, 27 Feb 2009 15:20:56 -0800
David Brownell <david-b@...bell.net> wrote:

> On Friday 27 February 2009, Andrew Morton wrote:
> > > > 
> > > > What has gone wrong here?
> > > 
> > > Not much I can see. __It's registering a platform_device,
> > > but only if it could be used on this system.
> > 
> > Again, that all gets fixed if this is done the right way around. __Run
> > your probe function. __If the hardware is there, register with the core
> > and all the nodes appear. __If the hardware is not present: bale.
> 
> Right.  If there's no button hooked up to its "power button"
> signal, don't register that "twl4030-pwrbutton" node.
> 
> 
> > The design of the whole subsystem appears to be upside down :(
> 
> You seem to be missing something.  Is it only the lack of that
> tweak Felipe sent?

I generally just delete unchangelogged patches.

<goes back and finds it>


That doesn't address the problem at all.  A function called
"add_children" just shouldn't exist.  The general kernel design is for
client drivers to register themselves with the core, so the core does
not have any hard-wired knowledge of any client drivers.

IOW, twl4030_pwrbutton_probe() should call into twl4030-core,
registering the powerbutton driver.

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