Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

device create: sound: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+14 -17
+3 -3
sound/core/init.c
··· 549 549 return -EINVAL; 550 550 #ifndef CONFIG_SYSFS_DEPRECATED 551 551 if (!card->card_dev) { 552 - card->card_dev = device_create_drvdata(sound_class, card->dev, 553 - MKDEV(0, 0), NULL, 554 - "card%i", card->number); 552 + card->card_dev = device_create(sound_class, card->dev, 553 + MKDEV(0, 0), NULL, 554 + "card%i", card->number); 555 555 if (IS_ERR(card->card_dev)) 556 556 card->card_dev = NULL; 557 557 }
+2 -3
sound/core/sound.c
··· 274 274 return minor; 275 275 } 276 276 snd_minors[minor] = preg; 277 - preg->dev = device_create_drvdata(sound_class, device, 278 - MKDEV(major, minor), 279 - private_data, "%s", name); 277 + preg->dev = device_create(sound_class, device, MKDEV(major, minor), 278 + private_data, "%s", name); 280 279 if (IS_ERR(preg->dev)) { 281 280 snd_minors[minor] = NULL; 282 281 mutex_unlock(&sound_mutex);
+7 -8
sound/oss/soundcard.c
··· 560 560 sound_dmap_flag = (dmabuf > 0 ? 1 : 0); 561 561 562 562 for (i = 0; i < ARRAY_SIZE(dev_list); i++) { 563 - device_create_drvdata(sound_class, NULL, 564 - MKDEV(SOUND_MAJOR, dev_list[i].minor), 565 - NULL, "%s", dev_list[i].name); 563 + device_create(sound_class, NULL, 564 + MKDEV(SOUND_MAJOR, dev_list[i].minor), NULL, 565 + "%s", dev_list[i].name); 566 566 567 567 if (!dev_list[i].num) 568 568 continue; 569 569 570 570 for (j = 1; j < *dev_list[i].num; j++) 571 - device_create_drvdata(sound_class, NULL, 572 - MKDEV(SOUND_MAJOR, 573 - dev_list[i].minor + (j*0x10)), 574 - NULL, 575 - "%s%d", dev_list[i].name, j); 571 + device_create(sound_class, NULL, 572 + MKDEV(SOUND_MAJOR, 573 + dev_list[i].minor + (j*0x10)), 574 + NULL, "%s%d", dev_list[i].name, j); 576 575 } 577 576 578 577 if (sound_nblocks >= 1024)
+2 -3
sound/sound_core.c
··· 220 220 else 221 221 sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); 222 222 223 - device_create_drvdata(sound_class, dev, 224 - MKDEV(SOUND_MAJOR, s->unit_minor), 225 - NULL, s->name+6); 223 + device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), 224 + NULL, s->name+6); 226 225 return r; 227 226 228 227 fail: