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, 14 Jan 2008 14:30:19 +0100
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	"Mike Frysinger" <vapier.adi@...il.com>
Cc:	"Alan Cox" <alan@...rguk.ukuu.org.uk>,
	"Marc Pignat" <marc.pignat@...s.ch>, wim@...ana.be,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC, PATCH] watchdog on gpio

On Mon, 14 Jan 2008 07:22:39 -0500
"Mike Frysinger" <vapier.adi@...il.com> wrote:

> > There is: platform_driver_probe(). It takes the probe function as a
> > parameter so that it can be left out of the platform_driver struct.
> > After it returns, there are no references to the probe function left
> > around, so if you call platform_driver_probe() instead of
> > platform_driver_register(), the probe function can be __init.  
> 
> ah, thanks for that.  i think in that case, there's no way to bind the
> release function to the process ?  which means the driver is no longer
> unloadable ?  which means the platform driver release function can be
> scrubbed as well as the module exit function as well as changing the
> Kconfig to be a bool ?

No, you can still provide a remove() callback, but it can usually be
__exit_p since it will only be needed if you compile the driver as a
module.

The platform_driver will be registered just as before; the only
difference is that it won't have a probe() callback so dynamically
added devices can't be bound to the driver. If the driver has a
remove() callback, it will be called when the driver is unregistered,
but that will usually only happen if the driver is compiled as a
module (and has a module exit function.)

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