projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2871f55
)
device create: i2c: convert device_create to device_create_drvdata
author
Greg Kroah-Hartman
<gregkh@suse.de>
Wed, 21 May 2008 19:52:33 +0000
(12:52 -0700)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Tue, 22 Jul 2008 04:54:42 +0000
(21:54 -0700)
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/i2c-dev.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/i2c-dev.c
b/drivers/i2c/i2c-dev.c
index 86727fa8858fcf808a1a1373efe0ecc46a2e5678..9d55c6383b2323bd908b782095420196498842aa 100644
(file)
--- a/
drivers/i2c/i2c-dev.c
+++ b/
drivers/i2c/i2c-dev.c
@@
-521,9
+521,9
@@
static int i2cdev_attach_adapter(struct i2c_adapter *adap)
return PTR_ERR(i2c_dev);
/* register this i2c device with the driver core */
- i2c_dev->dev = device_create(i2c_dev_class, &adap->dev,
- MKDEV(I2C_MAJOR, adap->nr),
- "i2c-%d", adap->nr);
+ i2c_dev->dev = device_create
_drvdata
(i2c_dev_class, &adap->dev,
+
MKDEV(I2C_MAJOR, adap->nr),
+
NULL,
"i2c-%d", adap->nr);
if (IS_ERR(i2c_dev->dev)) {
res = PTR_ERR(i2c_dev->dev);
goto error;