login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
11
Re: [RFC,PATCH v2] i2c: fix device_init_wakeup place
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Jean Delvare
Subject:
Re: [RFC,PATCH v2] i2c: fix device_init_wakeup place
Date: Monday, August 11, 2008 - 5:01 am
On Mon, 11 Aug 2008 10:31:35 +0200, Marc Pignat wrote:
quoted text
> device_init_wakeup must be called after device_register. > > Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> > --- > > Hi all! > > The current i2c code calls device_init_wakeup() before device_register, but > device_register (by calling device_initialize) will disable device wakeup. > > This patch (against 2.6.27-rc2) move the device_init_wakeup() call in the bus > probe function, just before the probe call. > > This patch also include a small functionnal change: the I2C_CLIENT_WAKE is no > more removed from the client flags, but this should't hurt. > > Changes from v1: > - patch against 2.6.24-rc2 > - call to device_init_wakeup depends on !device_can_wakeup (suggested by David > Brownell) > > Best regards > > Marc > > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > index 7bf38c4..0039bd9 100644 > --- a/drivers/i2c/i2c-core.c > +++ b/drivers/i2c/i2c-core.c > @@ -108,6 +108,9 @@ static int i2c_device_probe(struct device *dev) > if (!driver->probe || !driver->id_table) > return -ENODEV; > client->driver = driver; > + if (!device_can_wakeup(&client->dev)) > + device_init_wakeup(&client->dev, > + client->flags & I2C_CLIENT_WAKE); > dev_dbg(dev, "probe\n"); > > status = driver->probe(client, i2c_match_id(driver->id_table, client)); > @@ -262,9 +265,8 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) > client->adapter = adap; > > client->dev.platform_data = info->platform_data; > - device_init_wakeup(&client->dev, info->flags & I2C_CLIENT_WAKE); > > - client->flags = info->flags & ~I2C_CLIENT_WAKE; > + client->flags = info->flags; > client->addr = info->addr; > client->irq = info->irq; >
Applied, thanks. -- Jean Delvare --
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:
Re: [RFC,PATCH v2] i2c: fix device_init_wakeup place
, Marc Pignat
, (Mon Aug 11, 1:31 am)
Re: [RFC,PATCH v2] i2c: fix device_init_wakeup place
, Jean Delvare
, (Mon Aug 11, 5:01 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Josef Sipek
Re: [PATCH 01/24] Unionfs: Documentation
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
Oleg Nesterov
Re: init's children list is long and slows reaping children.
Randy Dunlap
Re: mmotm 2010-06-11-16-40 uploaded
Pete Clements
2.6.20-git8 fails compile -- net/built-in.o __ipv6_addr_type
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Anuj Gakhar
Git Architecture Question
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
linux-netdev
:
Gerrit Renker
v2 [PATCH 1/4] dccp: Limit feature negotiation to connection setup phase
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Ingo Molnar
Re: [regression] nf_iterate(), BUG: unable to handle kernel NULL pointer dereference
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
[ARM] dma: use new dmabounce_sync_for_xxx() for dma_sync_single_xxx()
Linux Kernel Mailing List
MIPS: Cavium: Remove unused watchdog code.
Linux Kernel Mailing List
V4L/DVB (8976): af9015: Add USB ID for AVerMedia A309
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
openbsd-misc
:
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Bryan Irvine
Re: OpenBSD 4.7 Released, May 19 2010
Jacob Yocom-Piatt
Re: Same shit all over again
Colocation donated by:
Syndicate