driver core: class: remove module * from class_create()

The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2023-03-13 19:18:35 +01:00
parent 6e30a66433
commit 1aaba11da9
140 changed files with 144 additions and 145 deletions

View File

@ -234,7 +234,7 @@ static int __init mips_mt_init(void)
{
struct class *mtc;
mtc = class_create(THIS_MODULE, "mt");
mtc = class_create("mt");
if (IS_ERR(mtc))
return PTR_ERR(mtc);

View File

@ -550,7 +550,7 @@ static int __init sbprof_tb_init(void)
return -EIO;
}
tbc = class_create(THIS_MODULE, "sb_tracebuffer");
tbc = class_create("sb_tracebuffer");
if (IS_ERR(tbc)) {
err = PTR_ERR(tbc);
goto out_chrdev;

View File

@ -581,7 +581,7 @@ int vas_register_coproc_api(struct module *mod, enum vas_cop_type cop_type,
pr_devel("%s device allocated, dev [%i,%i]\n", name,
MAJOR(coproc_device.devt), MINOR(coproc_device.devt));
coproc_device.class = class_create(mod, name);
coproc_device.class = class_create(name);
if (IS_ERR(coproc_device.class)) {
rc = PTR_ERR(coproc_device.class);
pr_err("Unable to create %s class %d\n", name, rc);

View File

@ -1580,7 +1580,7 @@ int rdt_pseudo_lock_init(void)
pseudo_lock_major = ret;
pseudo_lock_class = class_create(THIS_MODULE, "pseudo_lock");
pseudo_lock_class = class_create("pseudo_lock");
if (IS_ERR(pseudo_lock_class)) {
ret = PTR_ERR(pseudo_lock_class);
unregister_chrdev(pseudo_lock_major, "pseudo_lock");

View File

@ -154,7 +154,7 @@ static int __init cpuid_init(void)
CPUID_MAJOR);
return -EBUSY;
}
cpuid_class = class_create(THIS_MODULE, "cpuid");
cpuid_class = class_create("cpuid");
if (IS_ERR(cpuid_class)) {
err = PTR_ERR(cpuid_class);
goto out_chrdev;

View File

@ -263,7 +263,7 @@ static int __init msr_init(void)
pr_err("unable to get major %d for msr\n", MSR_MAJOR);
return -EBUSY;
}
msr_class = class_create(THIS_MODULE, "msr");
msr_class = class_create("msr");
if (IS_ERR(msr_class)) {
err = PTR_ERR(msr_class);
goto out_chrdev;

View File

@ -245,7 +245,7 @@ static int __init bsg_init(void)
dev_t devid;
int ret;
bsg_class = class_create(THIS_MODULE, "bsg");
bsg_class = class_create("bsg");
if (IS_ERR(bsg_class))
return PTR_ERR(bsg_class);
bsg_class->devnode = bsg_devnode;

View File

@ -34,7 +34,7 @@ static char *accel_devnode(const struct device *dev, umode_t *mode)
static int accel_sysfs_init(void)
{
accel_class = class_create(THIS_MODULE, "accel");
accel_class = class_create("accel");
if (IS_ERR(accel_class))
return PTR_ERR(accel_class);

View File

@ -702,7 +702,7 @@ static int __init hl_init(void)
hl_major = MAJOR(dev);
hl_class = class_create(THIS_MODULE, HL_NAME);
hl_class = class_create(HL_NAME);
if (IS_ERR(hl_class)) {
pr_err("failed to allocate class\n");
rc = PTR_ERR(hl_class);

View File

@ -210,7 +210,7 @@ void wakeup_source_sysfs_remove(struct wakeup_source *ws)
static int __init wakeup_sources_sysfs_init(void)
{
wakeup_class = class_create(THIS_MODULE, "wakeup");
wakeup_class = class_create("wakeup");
return PTR_ERR_OR_ZERO(wakeup_class);
}

View File

@ -290,7 +290,7 @@ aoechr_init(void)
}
init_completion(&emsgs_comp);
spin_lock_init(&emsgs_lock);
aoe_class = class_create(THIS_MODULE, "aoe");
aoe_class = class_create("aoe");
if (IS_ERR(aoe_class)) {
unregister_chrdev(AOE_MAJOR, "aoechr");
return PTR_ERR(aoe_class);

View File

@ -646,7 +646,7 @@ int rnbd_clt_create_sysfs_files(void)
{
int err;
rnbd_dev_class = class_create(THIS_MODULE, "rnbd-client");
rnbd_dev_class = class_create("rnbd-client");
if (IS_ERR(rnbd_dev_class))
return PTR_ERR(rnbd_dev_class);

View File

@ -215,7 +215,7 @@ int rnbd_srv_create_sysfs_files(void)
{
int err;
rnbd_dev_class = class_create(THIS_MODULE, "rnbd-server");
rnbd_dev_class = class_create("rnbd-server");
if (IS_ERR(rnbd_dev_class))
return PTR_ERR(rnbd_dev_class);

View File

@ -2266,7 +2266,7 @@ static int __init ublk_init(void)
if (ret)
goto unregister_mis;
ublk_chr_class = class_create(THIS_MODULE, "ublk-char");
ublk_chr_class = class_create("ublk-char");
if (IS_ERR(ublk_chr_class)) {
ret = PTR_ERR(ublk_chr_class);
goto free_chrdev_region;

View File

@ -293,7 +293,7 @@ static int __init bsr_init(void)
if (!np)
goto out_err;
bsr_class = class_create(THIS_MODULE, "bsr");
bsr_class = class_create("bsr");
if (IS_ERR(bsr_class)) {
printk(KERN_ERR "class_create() failed for bsr_class\n");
ret = PTR_ERR(bsr_class);

View File

@ -504,7 +504,7 @@ static int __init dsp56k_init_driver(void)
printk("DSP56k driver: Unable to register driver\n");
return -ENODEV;
}
dsp56k_class = class_create(THIS_MODULE, "dsp56k");
dsp56k_class = class_create("dsp56k");
if (IS_ERR(dsp56k_class)) {
err = PTR_ERR(dsp56k_class);
goto out_chrdev;

View File

@ -860,7 +860,7 @@ static int __init init_ipmi_devintf(void)
pr_info("ipmi device interface\n");
ipmi_class = class_create(THIS_MODULE, "ipmi");
ipmi_class = class_create("ipmi");
if (IS_ERR(ipmi_class)) {
pr_err("ipmi: can't register device class\n");
return PTR_ERR(ipmi_class);

View File

@ -1049,7 +1049,7 @@ static int __init lp_init(void)
return -EIO;
}
lp_class = class_create(THIS_MODULE, "printer");
lp_class = class_create("printer");
if (IS_ERR(lp_class)) {
err = PTR_ERR(lp_class);
goto out_reg;

View File

@ -762,7 +762,7 @@ static int __init chr_dev_init(void)
if (register_chrdev(MEM_MAJOR, "mem", &memory_fops))
printk("unable to get major %d for memory devs\n", MEM_MAJOR);
mem_class = class_create(THIS_MODULE, "mem");
mem_class = class_create("mem");
if (IS_ERR(mem_class))
return PTR_ERR(mem_class);

View File

@ -286,7 +286,7 @@ static int __init misc_init(void)
struct proc_dir_entry *ret;
ret = proc_create_seq("misc", 0, NULL, &misc_seq_ops);
misc_class = class_create(THIS_MODULE, "misc");
misc_class = class_create("misc");
err = PTR_ERR(misc_class);
if (IS_ERR(misc_class))
goto fail_remove;

View File

@ -1878,7 +1878,7 @@ static int __init cmm_init(void)
{
int rc;
cmm_class = class_create(THIS_MODULE, "cardman_4000");
cmm_class = class_create("cardman_4000");
if (IS_ERR(cmm_class))
return PTR_ERR(cmm_class);

View File

@ -650,7 +650,7 @@ static int __init cm4040_init(void)
{
int rc;
cmx_class = class_create(THIS_MODULE, "cardman_4040");
cmx_class = class_create("cardman_4040");
if (IS_ERR(cmx_class))
return PTR_ERR(cmx_class);

View File

@ -325,7 +325,7 @@ static int __init scr24x_init(void)
{
int ret;
scr24x_class = class_create(THIS_MODULE, "scr24x");
scr24x_class = class_create("scr24x");
if (IS_ERR(scr24x_class))
return PTR_ERR(scr24x_class);

View File

@ -841,7 +841,7 @@ static int __init ppdev_init(void)
pr_warn(CHRDEV ": unable to get major %d\n", PP_MAJOR);
return -EIO;
}
ppdev_class = class_create(THIS_MODULE, CHRDEV);
ppdev_class = class_create(CHRDEV);
if (IS_ERR(ppdev_class)) {
err = PTR_ERR(ppdev_class);
goto out_chrdev;

View File

@ -466,13 +466,13 @@ static int __init tpm_init(void)
{
int rc;
tpm_class = class_create(THIS_MODULE, "tpm");
tpm_class = class_create("tpm");
if (IS_ERR(tpm_class)) {
pr_err("couldn't create tpm class\n");
return PTR_ERR(tpm_class);
}
tpmrm_class = class_create(THIS_MODULE, "tpmrm");
tpmrm_class = class_create("tpmrm");
if (IS_ERR(tpmrm_class)) {
pr_err("couldn't create tpmrm class\n");
rc = PTR_ERR(tpmrm_class);

View File

@ -2244,7 +2244,7 @@ static int __init virtio_console_init(void)
{
int err;
pdrvdata.class = class_create(THIS_MODULE, "virtio-ports");
pdrvdata.class = class_create("virtio-ports");
if (IS_ERR(pdrvdata.class)) {
err = PTR_ERR(pdrvdata.class);
pr_err("Error %d creating virtio-ports class\n", err);

View File

@ -856,7 +856,7 @@ static int __init hwicap_module_init(void)
dev_t devt;
int retval;
icap_class = class_create(THIS_MODULE, "xilinx_config");
icap_class = class_create("xilinx_config");
mutex_init(&icap_sem);
devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR);

View File

@ -242,7 +242,7 @@ EXPORT_SYMBOL(xillybus_find_inode);
static int __init xillybus_class_init(void)
{
xillybus_class = class_create(THIS_MODULE, "xillybus");
xillybus_class = class_create("xillybus");
if (IS_ERR(xillybus_class)) {
pr_warn("Failed to register xillybus class\n");

View File

@ -3383,7 +3383,7 @@ static int __init comedi_init(void)
if (retval)
goto out_unregister_chrdev_region;
comedi_class = class_create(THIS_MODULE, "comedi");
comedi_class = class_create("comedi");
if (IS_ERR(comedi_class)) {
retval = PTR_ERR(comedi_class);
pr_err("failed to create class\n");

View File

@ -795,7 +795,7 @@ static int __init comedi_test_init(void)
}
if (!config_mode) {
ctcls = class_create(THIS_MODULE, CLASS_NAME);
ctcls = class_create(CLASS_NAME);
if (IS_ERR(ctcls)) {
pr_warn("comedi_test: unable to create class\n");
goto clean3;

View File

@ -56,7 +56,7 @@ static int adf_chr_drv_create(void)
return -EFAULT;
}
adf_ctl_drv.drv_class = class_create(THIS_MODULE, DEVICE_NAME);
adf_ctl_drv.drv_class = class_create(DEVICE_NAME);
if (IS_ERR(adf_ctl_drv.drv_class)) {
pr_err("QAT: class_create failed for adf_ctl\n");
goto err_chrdev_unreg;

View File

@ -74,7 +74,7 @@ int __init dca_sysfs_init(void)
idr_init(&dca_idr);
spin_lock_init(&dca_idr_lock);
dca_class = class_create(THIS_MODULE, "dca");
dca_class = class_create("dca");
if (IS_ERR(dca_class)) {
idr_destroy(&dca_idr);
return PTR_ERR(dca_class);

View File

@ -469,7 +469,7 @@ ATTRIBUTE_GROUPS(devfreq_event);
static int __init devfreq_event_init(void)
{
devfreq_event_class = class_create(THIS_MODULE, "devfreq-event");
devfreq_event_class = class_create("devfreq-event");
if (IS_ERR(devfreq_event_class)) {
pr_err("%s: couldn't create class\n", __FILE__);
return PTR_ERR(devfreq_event_class);

View File

@ -1988,7 +1988,7 @@ DEFINE_SHOW_ATTRIBUTE(devfreq_summary);
static int __init devfreq_init(void)
{
devfreq_class = class_create(THIS_MODULE, "devfreq");
devfreq_class = class_create("devfreq");
if (IS_ERR(devfreq_class)) {
pr_err("%s: couldn't create class\n", __FILE__);
return PTR_ERR(devfreq_class);

View File

@ -314,7 +314,7 @@ static int dma_heap_init(void)
if (ret)
return ret;
dma_heap_class = class_create(THIS_MODULE, DEVNAME);
dma_heap_class = class_create(DEVNAME);
if (IS_ERR(dma_heap_class)) {
unregister_chrdev_region(dma_heap_devt, NUM_HEAP_MINORS);
return PTR_ERR(dma_heap_class);

View File

@ -1013,7 +1013,7 @@ ATTRIBUTE_GROUPS(extcon);
static int create_extcon_class(void)
{
if (!extcon_class) {
extcon_class = class_create(THIS_MODULE, "extcon");
extcon_class = class_create("extcon");
if (IS_ERR(extcon_class))
return PTR_ERR(extcon_class);
extcon_class->dev_groups = extcon_groups;

View File

@ -416,7 +416,7 @@ static void fpga_bridge_dev_release(struct device *dev)
static int __init fpga_bridge_dev_init(void)
{
fpga_bridge_class = class_create(THIS_MODULE, "fpga_bridge");
fpga_bridge_class = class_create("fpga_bridge");
if (IS_ERR(fpga_bridge_class))
return PTR_ERR(fpga_bridge_class);

View File

@ -971,7 +971,7 @@ static int __init fpga_mgr_class_init(void)
{
pr_info("FPGA manager framework\n");
fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager");
fpga_mgr_class = class_create("fpga_manager");
if (IS_ERR(fpga_mgr_class))
return PTR_ERR(fpga_mgr_class);

View File

@ -293,7 +293,7 @@ static void fpga_region_dev_release(struct device *dev)
*/
static int __init fpga_region_init(void)
{
fpga_region_class = class_create(THIS_MODULE, "fpga_region");
fpga_region_class = class_create("fpga_region");
if (IS_ERR(fpga_region_class))
return PTR_ERR(fpga_region_class);

View File

@ -387,7 +387,7 @@ static int __init gnss_module_init(void)
return ret;
}
gnss_class = class_create(THIS_MODULE, "gnss");
gnss_class = class_create("gnss");
if (IS_ERR(gnss_class)) {
ret = PTR_ERR(gnss_class);
pr_err("failed to create class: %d\n", ret);

View File

@ -93,7 +93,7 @@ int kfd_chardev_init(void)
if (err < 0)
goto err_register_chrdev;
kfd_class = class_create(THIS_MODULE, kfd_dev_name);
kfd_class = class_create(kfd_dev_name);
err = PTR_ERR(kfd_class);
if (IS_ERR(kfd_class))
goto err_class_create;

View File

@ -330,7 +330,7 @@ int drm_dp_aux_dev_init(void)
{
int res;
drm_dp_aux_dev_class = class_create(THIS_MODULE, "drm_dp_aux_dev");
drm_dp_aux_dev_class = class_create("drm_dp_aux_dev");
if (IS_ERR(drm_dp_aux_dev_class)) {
return PTR_ERR(drm_dp_aux_dev_class);
}

View File

@ -112,7 +112,7 @@ int drm_sysfs_init(void)
{
int err;
drm_class = class_create(THIS_MODULE, "drm");
drm_class = class_create("drm");
if (IS_ERR(drm_class))
return PTR_ERR(drm_class);

View File

@ -433,7 +433,7 @@ static int __init arvo_init(void)
{
int retval;
arvo_class = class_create(THIS_MODULE, "arvo");
arvo_class = class_create("arvo");
if (IS_ERR(arvo_class))
return PTR_ERR(arvo_class);
arvo_class->dev_groups = arvo_groups;

View File

@ -435,7 +435,7 @@ static struct hid_driver isku_driver = {
static int __init isku_init(void)
{
int retval;
isku_class = class_create(THIS_MODULE, "isku");
isku_class = class_create("isku");
if (IS_ERR(isku_class))
return PTR_ERR(isku_class);
isku_class->dev_groups = isku_groups;

View File

@ -890,7 +890,7 @@ static int __init kone_init(void)
int retval;
/* class name has to be same as driver name */
kone_class = class_create(THIS_MODULE, "kone");
kone_class = class_create("kone");
if (IS_ERR(kone_class))
return PTR_ERR(kone_class);
kone_class->dev_groups = kone_groups;

View File

@ -549,7 +549,7 @@ static int __init koneplus_init(void)
int retval;
/* class name has to be same as driver name */
koneplus_class = class_create(THIS_MODULE, "koneplus");
koneplus_class = class_create("koneplus");
if (IS_ERR(koneplus_class))
return PTR_ERR(koneplus_class);
koneplus_class->dev_groups = koneplus_groups;

View File

@ -207,7 +207,7 @@ static int __init konepure_init(void)
{
int retval;
konepure_class = class_create(THIS_MODULE, "konepure");
konepure_class = class_create("konepure");
if (IS_ERR(konepure_class))
return PTR_ERR(konepure_class);
konepure_class->dev_groups = konepure_groups;

View File

@ -638,7 +638,7 @@ static int __init kovaplus_init(void)
{
int retval;
kovaplus_class = class_create(THIS_MODULE, "kovaplus");
kovaplus_class = class_create("kovaplus");
if (IS_ERR(kovaplus_class))
return PTR_ERR(kovaplus_class);
kovaplus_class->dev_groups = kovaplus_groups;

View File

@ -585,7 +585,7 @@ static int __init pyra_init(void)
int retval;
/* class name has to be same as driver name */
pyra_class = class_create(THIS_MODULE, "pyra");
pyra_class = class_create("pyra");
if (IS_ERR(pyra_class))
return PTR_ERR(pyra_class);
pyra_class->dev_groups = pyra_groups;

View File

@ -216,7 +216,7 @@ static int __init ryos_init(void)
{
int retval;
ryos_class = class_create(THIS_MODULE, "ryos");
ryos_class = class_create("ryos");
if (IS_ERR(ryos_class))
return PTR_ERR(ryos_class);
ryos_class->dev_groups = ryos_groups;

View File

@ -204,7 +204,7 @@ static int __init savu_init(void)
{
int retval;
savu_class = class_create(THIS_MODULE, "savu");
savu_class = class_create("savu");
if (IS_ERR(savu_class))
return PTR_ERR(savu_class);
savu_class->dev_groups = savu_groups;

View File

@ -618,7 +618,7 @@ int __init hidraw_init(void)
hidraw_major = MAJOR(dev_id);
hidraw_class = class_create(THIS_MODULE, "hidraw");
hidraw_class = class_create("hidraw");
if (IS_ERR(hidraw_class)) {
result = PTR_ERR(hidraw_class);
goto error_cdev;

View File

@ -739,7 +739,7 @@ static int __init i2c_dev_init(void)
if (res)
goto out;
i2c_dev_class = class_create(THIS_MODULE, "i2c-dev");
i2c_dev_class = class_create("i2c-dev");
if (IS_ERR(i2c_dev_class)) {
res = PTR_ERR(i2c_dev_class);
goto out_unreg_chrdev;

View File

@ -1264,7 +1264,7 @@ static int __init ib_uverbs_init(void)
goto out_alloc;
}
uverbs_class = class_create(THIS_MODULE, "infiniband_verbs");
uverbs_class = class_create("infiniband_verbs");
if (IS_ERR(uverbs_class)) {
ret = PTR_ERR(uverbs_class);
pr_err("user_verbs: couldn't create class infiniband_verbs\n");

View File

@ -102,7 +102,7 @@ int __init dev_init(void)
goto done;
}
class = class_create(THIS_MODULE, class_name());
class = class_create(class_name());
if (IS_ERR(class)) {
ret = PTR_ERR(class);
pr_err("Could not create device class (err %d)\n", -ret);
@ -111,7 +111,7 @@ int __init dev_init(void)
}
class->devnode = hfi1_devnode;
user_class = class_create(THIS_MODULE, class_name_user());
user_class = class_create(class_name_user());
if (IS_ERR(user_class)) {
ret = PTR_ERR(user_class);
pr_err("Could not create device class for user accessible files (err %d)\n",

View File

@ -2326,7 +2326,7 @@ int __init qib_dev_init(void)
goto done;
}
qib_class = class_create(THIS_MODULE, "ipath");
qib_class = class_create("ipath");
if (IS_ERR(qib_class)) {
ret = PTR_ERR(qib_class);
pr_err("Could not create device class (err %d)\n", -ret);

View File

@ -3163,7 +3163,7 @@ static int __init rtrs_client_init(void)
{
rtrs_rdma_dev_pd_init(0, &dev_pd);
rtrs_clt_dev_class = class_create(THIS_MODULE, "rtrs-client");
rtrs_clt_dev_class = class_create("rtrs-client");
if (IS_ERR(rtrs_clt_dev_class)) {
pr_err("Failed to create rtrs-client dev class\n");
return PTR_ERR(rtrs_clt_dev_class);

View File

@ -2253,7 +2253,7 @@ static int __init rtrs_server_init(void)
err);
return err;
}
rtrs_dev_class = class_create(THIS_MODULE, "rtrs-server");
rtrs_dev_class = class_create("rtrs-server");
if (IS_ERR(rtrs_dev_class)) {
err = PTR_ERR(rtrs_dev_class);
goto out_err;

View File

@ -1393,7 +1393,7 @@ static int __init capi_init(void)
kcapi_exit();
return major_ret;
}
capi_class = class_create(THIS_MODULE, "capi");
capi_class = class_create("capi");
if (IS_ERR(capi_class)) {
unregister_chrdev(capi_major, "capi20");
kcapi_exit();

View File

@ -131,7 +131,7 @@ EXPORT_SYMBOL(mISDN_dsp_element_unregister);
int dsp_pipeline_module_init(void)
{
elements_class = class_create(THIS_MODULE, "dsp_pipeline");
elements_class = class_create("dsp_pipeline");
if (IS_ERR(elements_class))
return PTR_ERR(elements_class);

View File

@ -626,7 +626,7 @@ EXPORT_SYMBOL_GPL(devm_led_classdev_unregister);
static int __init leds_init(void)
{
leds_class = class_create(THIS_MODULE, "leds");
leds_class = class_create("leds");
if (IS_ERR(leds_class))
return PTR_ERR(leds_class);
leds_class->pm = &leds_class_dev_pm_ops;

View File

@ -888,7 +888,7 @@ adbdev_init(void)
return;
}
adb_dev_class = class_create(THIS_MODULE, "adb");
adb_dev_class = class_create("adb");
if (IS_ERR(adb_dev_class))
return;
device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");

View File

@ -1063,7 +1063,7 @@ static int __init init_dvbdev(void)
goto error;
}
dvb_class = class_create(THIS_MODULE, "dvb");
dvb_class = class_create("dvb");
if (IS_ERR(dvb_class)) {
retval = PTR_ERR(dvb_class);
goto error;

View File

@ -785,7 +785,7 @@ int __init lirc_dev_init(void)
{
int retval;
lirc_class = class_create(THIS_MODULE, "lirc");
lirc_class = class_create("lirc");
if (IS_ERR(lirc_class)) {
pr_err("class_create failed\n");
return PTR_ERR(lirc_class);

View File

@ -977,7 +977,7 @@ static int __init c2port_init(void)
printk(KERN_INFO "Silicon Labs C2 port support v. " DRIVER_VERSION
" - (C) 2007 Rodolfo Giometti\n");
c2port_class = class_create(THIS_MODULE, "c2port");
c2port_class = class_create("c2port");
if (IS_ERR(c2port_class)) {
printk(KERN_ERR "c2port: failed to allocate class\n");
return PTR_ERR(c2port_class);

View File

@ -678,7 +678,7 @@ int __init cxl_file_init(void)
pr_devel("CXL device allocated, MAJOR %i\n", MAJOR(cxl_dev));
cxl_class = class_create(THIS_MODULE, "cxl");
cxl_class = class_create("cxl");
if (IS_ERR(cxl_class)) {
pr_err("Unable to create CXL class\n");
rc = PTR_ERR(cxl_class);

View File

@ -1363,7 +1363,7 @@ static int __init genwqe_init_module(void)
{
int rc;
class_genwqe = class_create(THIS_MODULE, GENWQE_DEVNAME);
class_genwqe = class_create(GENWQE_DEVNAME);
if (IS_ERR(class_genwqe)) {
pr_err("[%s] create class failed\n", __func__);
return -ENOMEM;

View File

@ -888,7 +888,7 @@ static int __init ilo_init(void)
int error;
dev_t dev;
ilo_class = class_create(THIS_MODULE, "iLO");
ilo_class = class_create("iLO");
if (IS_ERR(ilo_class)) {
error = PTR_ERR(ilo_class);
goto out;

View File

@ -1275,7 +1275,7 @@ static int __init mei_init(void)
{
int ret;
mei_class = class_create(THIS_MODULE, "mei");
mei_class = class_create("mei");
if (IS_ERR(mei_class)) {
pr_err("couldn't create class\n");
ret = PTR_ERR(mei_class);

View File

@ -601,7 +601,7 @@ int ocxl_file_init(void)
return rc;
}
ocxl_class = class_create(THIS_MODULE, "ocxl");
ocxl_class = class_create("ocxl");
if (IS_ERR(ocxl_class)) {
pr_err("Unable to create ocxl class\n");
unregister_chrdev_region(ocxl_dev, OCXL_NUM_MINORS);

View File

@ -503,7 +503,7 @@ static int __init phantom_init(void)
int retval;
dev_t dev;
phantom_class = class_create(THIS_MODULE, "phantom");
phantom_class = class_create("phantom");
if (IS_ERR(phantom_class)) {
retval = PTR_ERR(phantom_class);
printk(KERN_ERR "phantom: can't register phantom class\n");

View File

@ -620,7 +620,7 @@ static int __init uacce_init(void)
{
int ret;
uacce_class = class_create(THIS_MODULE, UACCE_NAME);
uacce_class = class_create(UACCE_NAME);
if (IS_ERR(uacce_class))
return PTR_ERR(uacce_class);

View File

@ -491,7 +491,7 @@ static int __init most_cdev_init(void)
{
int err;
comp.class = class_create(THIS_MODULE, "most_cdev");
comp.class = class_create("most_cdev");
if (IS_ERR(comp.class))
return PTR_ERR(comp.class);

View File

@ -448,7 +448,7 @@ EXPORT_SYMBOL(hnae_ae_unregister);
static int __init hnae_init(void)
{
hnae_class = class_create(THIS_MODULE, "hnae");
hnae_class = class_create("hnae");
return PTR_ERR_OR_ZERO(hnae_class);
}

View File

@ -1394,7 +1394,7 @@ static int __init ppp_init(void)
goto out_net;
}
ppp_class = class_create(THIS_MODULE, "ppp");
ppp_class = class_create("ppp");
if (IS_ERR(ppp_class)) {
err = PTR_ERR(ppp_class);
goto out_chrdev;

View File

@ -5748,7 +5748,7 @@ static int __init init_mac80211_hwsim(void)
if (err)
goto out_exit_netlink;
hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim");
hwsim_class = class_create("mac80211_hwsim");
if (IS_ERR(hwsim_class)) {
err = PTR_ERR(hwsim_class);
goto out_exit_virtio;

View File

@ -1174,7 +1174,7 @@ static int __init wwan_init(void)
if (err)
return err;
wwan_class = class_create(THIS_MODULE, "wwan");
wwan_class = class_create("wwan");
if (IS_ERR(wwan_class)) {
err = PTR_ERR(wwan_class);
goto unregister;

View File

@ -511,7 +511,7 @@ static int __init wwan_hwsim_init(void)
if (!wwan_wq)
return -ENOMEM;
wwan_hwsim_class = class_create(THIS_MODULE, "wwan_hwsim");
wwan_hwsim_class = class_create("wwan_hwsim");
if (IS_ERR(wwan_hwsim_class)) {
err = PTR_ERR(wwan_hwsim_class);
goto err_wq_destroy;

View File

@ -1320,7 +1320,7 @@ int __init nvdimm_bus_init(void)
goto err_dimm_chrdev;
nvdimm_major = rc;
nd_class = class_create(THIS_MODULE, "nd");
nd_class = class_create("nd");
if (IS_ERR(nd_class)) {
rc = PTR_ERR(nd_class);
goto err_class;

View File

@ -5381,14 +5381,14 @@ static int __init nvme_core_init(void)
if (result < 0)
goto destroy_delete_wq;
nvme_class = class_create(THIS_MODULE, "nvme");
nvme_class = class_create("nvme");
if (IS_ERR(nvme_class)) {
result = PTR_ERR(nvme_class);
goto unregister_chrdev;
}
nvme_class->dev_uevent = nvme_class_uevent;
nvme_subsys_class = class_create(THIS_MODULE, "nvme-subsystem");
nvme_subsys_class = class_create("nvme-subsystem");
if (IS_ERR(nvme_subsys_class)) {
result = PTR_ERR(nvme_subsys_class);
goto destroy_class;
@ -5399,7 +5399,7 @@ static int __init nvme_core_init(void)
if (result < 0)
goto destroy_subsys_class;
nvme_ns_chr_class = class_create(THIS_MODULE, "nvme-generic");
nvme_ns_chr_class = class_create("nvme-generic");
if (IS_ERR(nvme_ns_chr_class)) {
result = PTR_ERR(nvme_ns_chr_class);
goto unregister_generic_ns;

View File

@ -1254,7 +1254,7 @@ static int __init nvmf_init(void)
if (!nvmf_default_host)
return -ENOMEM;
nvmf_class = class_create(THIS_MODULE, "nvme-fabrics");
nvmf_class = class_create("nvme-fabrics");
if (IS_ERR(nvmf_class)) {
pr_err("couldn't register class nvme-fabrics\n");
ret = PTR_ERR(nvmf_class);

View File

@ -1562,7 +1562,7 @@ static int __init fcloop_init(void)
{
int ret;
fcloop_class = class_create(THIS_MODULE, "fcloop");
fcloop_class = class_create("fcloop");
if (IS_ERR(fcloop_class)) {
pr_err("couldn't register class fcloop\n");
ret = PTR_ERR(fcloop_class);

View File

@ -860,7 +860,7 @@ EXPORT_SYMBOL_GPL(__devm_pci_epc_create);
static int __init pci_epc_init(void)
{
pci_epc_class = class_create(THIS_MODULE, "pci_epc");
pci_epc_class = class_create("pci_epc");
if (IS_ERR(pci_epc_class)) {
pr_err("failed to create pci epc class --> %ld\n",
PTR_ERR(pci_epc_class));

View File

@ -1804,7 +1804,7 @@ static int __init switchtec_init(void)
if (rc)
return rc;
switchtec_class = class_create(THIS_MODULE, "switchtec");
switchtec_class = class_create("switchtec");
if (IS_ERR(switchtec_class)) {
rc = PTR_ERR(switchtec_class);
goto err_create_class;

View File

@ -1233,7 +1233,7 @@ static void phy_release(struct device *dev)
static int __init phy_core_init(void)
{
phy_class = class_create(THIS_MODULE, "phy");
phy_class = class_create("phy");
if (IS_ERR(phy_class)) {
pr_err("failed to create phy class --> %ld\n",
PTR_ERR(phy_class));

View File

@ -1462,7 +1462,7 @@ EXPORT_SYMBOL_GPL(power_supply_get_drvdata);
static int __init power_supply_class_init(void)
{
power_supply_class = class_create(THIS_MODULE, "power_supply");
power_supply_class = class_create("power_supply");
if (IS_ERR(power_supply_class))
return PTR_ERR(power_supply_class);

View File

@ -456,7 +456,7 @@ static int __init pps_init(void)
{
int err;
pps_class = class_create(THIS_MODULE, "pps");
pps_class = class_create("pps");
if (IS_ERR(pps_class)) {
pr_err("failed to allocate class\n");
return PTR_ERR(pps_class);

View File

@ -460,7 +460,7 @@ static int __init ptp_init(void)
{
int err;
ptp_class = class_create(THIS_MODULE, "ptp");
ptp_class = class_create("ptp");
if (IS_ERR(ptp_class)) {
pr_err("ptp: failed to allocate class\n");
return PTR_ERR(ptp_class);

View File

@ -2603,7 +2603,7 @@ static int __init mport_init(void)
int ret;
/* Create device class needed by udev */
dev_class = class_create(THIS_MODULE, DRV_NAME);
dev_class = class_create(DRV_NAME);
if (IS_ERR(dev_class)) {
rmcd_error("Unable to create " DRV_NAME " class");
return PTR_ERR(dev_class);

View File

@ -2297,7 +2297,7 @@ static int __init riocm_init(void)
int ret;
/* Create device class needed by udev */
dev_class = class_create(THIS_MODULE, DRV_NAME);
dev_class = class_create(DRV_NAME);
if (IS_ERR(dev_class)) {
riocm_error("Cannot create " DRV_NAME " class");
return PTR_ERR(dev_class);

View File

@ -694,7 +694,7 @@ static int __init rpmsg_init(void)
{
int ret;
rpmsg_class = class_create(THIS_MODULE, "rpmsg");
rpmsg_class = class_create("rpmsg");
if (IS_ERR(rpmsg_class)) {
pr_err("failed to create rpmsg class\n");
return PTR_ERR(rpmsg_class);

View File

@ -475,7 +475,7 @@ EXPORT_SYMBOL_GPL(devm_rtc_device_register);
static int __init rtc_init(void)
{
rtc_class = class_create(THIS_MODULE, "rtc");
rtc_class = class_create("rtc");
if (IS_ERR(rtc_class)) {
pr_err("couldn't create class\n");
return PTR_ERR(rtc_class);

View File

@ -308,7 +308,7 @@ int hmcdrv_dev_init(void)
* /proc/devices), but not under /dev nor /sys/devices/virtual. So
* we have to create an associated class (see /sys/class).
*/
hmcdrv_dev_class = class_create(THIS_MODULE, HMCDRV_DEV_CLASS);
hmcdrv_dev_class = class_create(HMCDRV_DEV_CLASS);
if (IS_ERR(hmcdrv_dev_class)) {
rc = PTR_ERR(hmcdrv_dev_class);

View File

@ -1319,7 +1319,7 @@ static int raw3270_init(void)
if (rc == 0) {
/* Create attributes for early (= console) device. */
mutex_lock(&raw3270_mutex);
class3270 = class_create(THIS_MODULE, "3270");
class3270 = class_create("3270");
list_for_each_entry(rp, &raw3270_devices, list) {
get_device(&rp->cdev->dev);
raw3270_create_attributes(rp);

View File

@ -117,7 +117,7 @@ EXPORT_SYMBOL(unregister_tape_dev);
static int __init tape_init(void)
{
tape_class = class_create(THIS_MODULE, "tape390");
tape_class = class_create("tape390");
return 0;
}

View File

@ -699,7 +699,7 @@ static int vmlogrdr_register_driver(void)
if (ret)
goto out_iucv;
vmlogrdr_class = class_create(THIS_MODULE, "vmlogrdr");
vmlogrdr_class = class_create("vmlogrdr");
if (IS_ERR(vmlogrdr_class)) {
ret = PTR_ERR(vmlogrdr_class);
vmlogrdr_class = NULL;

View File

@ -1022,7 +1022,7 @@ static int __init ur_init(void)
debug_set_level(vmur_dbf, 6);
vmur_class = class_create(THIS_MODULE, "vmur");
vmur_class = class_create("vmur");
if (IS_ERR(vmur_class)) {
rc = PTR_ERR(vmur_class);
goto fail_free_dbf;

View File

@ -2171,7 +2171,7 @@ static int __init zcdn_init(void)
int rc;
/* create a new class 'zcrypt' */
zcrypt_class = class_create(THIS_MODULE, ZCRYPT_NAME);
zcrypt_class = class_create(ZCRYPT_NAME);
if (IS_ERR(zcrypt_class)) {
rc = PTR_ERR(zcrypt_class);
goto out_class_create_failed;

View File

@ -323,7 +323,7 @@ static int __init dax_attach(void)
goto done;
}
cl = class_create(THIS_MODULE, DAX_NAME);
cl = class_create(DAX_NAME);
if (IS_ERR(cl)) {
dax_err("class_create failed");
ret = PTR_ERR(cl);

Some files were not shown because too many files have changed in this diff Show More