diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 15:52:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:41 -0400 |
commit | 47aa5793f78c274d51711f6a621fa6b02d4e6402 (patch) | |
tree | 88c45b3a90fc7d7b4210bf5727497294b0a951eb /drivers/char/raw.c | |
parent | f79f060561d04a38d41e773ade9baafce3c96179 (diff) |
device create: char: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/raw.c')
-rw-r--r-- | drivers/char/raw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 505fcbe884a4..47b8cf281d4a 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -131,8 +131,8 @@ raw_ioctl(struct inode *inode, struct file *filp, | |||
131 | static void bind_device(struct raw_config_request *rq) | 131 | static void bind_device(struct raw_config_request *rq) |
132 | { | 132 | { |
133 | device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); | 133 | device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); |
134 | device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), | 134 | device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor), |
135 | "raw%d", rq->raw_minor); | 135 | NULL, "raw%d", rq->raw_minor); |
136 | } | 136 | } |
137 | 137 | ||
138 | /* | 138 | /* |
@@ -283,7 +283,8 @@ static int __init raw_init(void) | |||
283 | ret = PTR_ERR(raw_class); | 283 | ret = PTR_ERR(raw_class); |
284 | goto error_region; | 284 | goto error_region; |
285 | } | 285 | } |
286 | device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), "rawctl"); | 286 | device_create_drvdata(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, |
287 | "rawctl"); | ||
287 | 288 | ||
288 | return 0; | 289 | return 0; |
289 | 290 | ||