login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
14
Re: [PATCH]add private data to struct notifier_bock
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: mark gross
Subject:
Re: [PATCH]add private data to struct notifier_bock
Date: Monday, April 14, 2008 - 1:05 pm
On Mon, Apr 14, 2008 at 08:04:09PM +0200, Peter Zijlstra wrote:
quoted text
> On Mon, 2008-04-14 at 09:19 -0700, mark gross wrote: > > I am working with one of the iwl4965 developers to add pm_qos based > > power management to its power states. We relalized that the block > > notifier I used in the PM_QOS has no way of passing in any driver device > > instance data. In this case the developer expected the notification > > call backs to call the iwl4965 notification function with an instance > > pointer to the correct *dev. > > > > Poking around I've noticed a handful of drivers using notifications that > > seem to keep a list of instance pointers around so it can plug into the > > notification infrastructure. including : ipmi_msghandler.c adb_hid.c > > md.c ips.c > > > > As having a registered call back called with a private data pointer set > > up at registration time is such a common idiom I thought it might be a > > good thing to add a private_data pointer to the struct notifier_block > > and add the interfaces needed to pass the private data as the > > notification chain is processed. > > How is: > > struct my_device_thingy { > ... > struct notifier_block my_notifier; > ... > }; > > int my_device_notifier_call(struct notifier_block *nb, unsigned long val > void *data) > { > struct my_device_thingy *mdt = container_of(nb, struct > my_device_thingy, my_notifier); > > ... > } > > not sufficient?
Because ... um....a.... that would work too. Please ignore my last patch. Thanks! --mgross --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH]add private data to struct notifier_bock
, mark gross
, (Mon Apr 14, 9:19 am)
Re: [PATCH]add private data to struct notifier_bock
, Peter Zijlstra
, (Mon Apr 14, 11:04 am)
Re: [PATCH]add private data to struct notifier_bock
, mark gross
, (Mon Apr 14, 1:05 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 16/36] driver core: cpu: fix section mismatch in cpu.c:store_online
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
git
:
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
Johan Herland
[PATCH 6/7] Softrefs: Administrivia associated with softrefs subsystem and git-sof...
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Conor
Re: RFID Reader
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Stuart Henderson
Re: SquidGuard problem
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Colocation donated by:
Syndicate