]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
device create: ieee1394: convert device_create to device_create_drvdata
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:43 +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: Ben Collins <ben.collins@ubuntu.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ieee1394/dv1394.c
drivers/ieee1394/raw1394.c
drivers/ieee1394/video1394.c

index 9d19aec5820a303145d8b286e2d1ce2e72b4a586..b6eb2cf25914479667439fa51e181fca1e986fbd 100644 (file)
@@ -2296,9 +2296,10 @@ static void dv1394_add_host(struct hpsb_host *host)
 
        ohci = (struct ti_ohci *)host->hostdata;
 
-       device_create(hpsb_protocol_class, NULL, MKDEV(
-               IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
-               "dv1394-%d", id);
+       device_create_drvdata(hpsb_protocol_class, NULL,
+                             MKDEV(IEEE1394_MAJOR,
+                                   IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), NULL,
+                             "dv1394-%d", id);
 
        dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE);
        dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT);
index 96f2847b0405e03ced5c4d3ec5b50a973caf6129..6fa9e4a21840b5f0cad2ce28b3754b293913e8fc 100644 (file)
@@ -3010,10 +3010,10 @@ static int __init init_raw1394(void)
        hpsb_register_highlevel(&raw1394_highlevel);
 
        if (IS_ERR
-           (device_create(
+           (device_create_drvdata(
              hpsb_protocol_class, NULL,
              MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
-             RAW1394_DEVICE_NAME))) {
+             NULL, RAW1394_DEVICE_NAME))) {
                ret = -EFAULT;
                goto out_unreg;
        }
index 069b9f6bf16dae8396d871673c8618eb544967a7..25db6e67fa4ea6d123f9a71df2e9c44616e84c3d 100644 (file)
@@ -1341,9 +1341,9 @@ static void video1394_add_host (struct hpsb_host *host)
        hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
 
        minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
-       device_create(hpsb_protocol_class, NULL,
-                     MKDEV(IEEE1394_MAJOR, minor),
-                     "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
+       device_create_drvdata(hpsb_protocol_class, NULL,
+                             MKDEV(IEEE1394_MAJOR, minor), NULL,
+                             "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
 }