{
struct class *mtc;
- mtc = class_create(THIS_MODULE, "mt");
+ mtc = class_create("mt");
if (IS_ERR(mtc))
return PTR_ERR(mtc);
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;
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);
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");
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;
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;
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;
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);
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);
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);
}
}
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);
{
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);
{
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);
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;
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);
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;
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);
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;
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);
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;
{
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);
{
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);
{
int ret;
- scr24x_class = class_create(THIS_MODULE, "scr24x");
+ scr24x_class = class_create("scr24x");
if (IS_ERR(scr24x_class))
return PTR_ERR(scr24x_class);
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;
{
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);
{
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);
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);
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");
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");
}
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;
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;
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);
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);
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);
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);
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;
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);
{
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);
*/
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);
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);
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;
{
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);
}
{
int err;
- drm_class = class_create(THIS_MODULE, "drm");
+ drm_class = class_create("drm");
if (IS_ERR(drm_class))
return PTR_ERR(drm_class);
{
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;
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;
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;
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;
{
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;
{
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;
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;
{
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;
{
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;
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;
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;
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");
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);
}
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",
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);
{
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);
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;
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();
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);
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;
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");
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;
{
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);
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);
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);
{
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;
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;
{
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);
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);
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");
{
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);
{
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);
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);
}
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;
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;
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;
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;
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;
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;
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;
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);
{
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);
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));
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;
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));
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);
{
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);
{
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);
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);
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);
{
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);
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);
* /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);
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);
static int __init tape_init(void)
{
- tape_class = class_create(THIS_MODULE, "tape390");
+ tape_class = class_create("tape390");
return 0;
}
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;
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;
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;
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);
int rc;
printk(KERN_INFO "SCSI Media Changer driver v" VERSION " \n");
- ch_sysfs_class = class_create(THIS_MODULE, "scsi_changer");
+ ch_sysfs_class = class_create("scsi_changer");
if (IS_ERR(ch_sysfs_class)) {
rc = PTR_ERR(ch_sysfs_class);
return rc;
cxlflash_major = MAJOR(devno);
- cxlflash_class = class_create(THIS_MODULE, "cxlflash");
+ cxlflash_class = class_create("cxlflash");
if (IS_ERR(cxlflash_class)) {
rc = PTR_ERR(cxlflash_class);
pr_err("%s: class_create failed rc=%d\n", __func__, rc);
}
pmcraid_major = MAJOR(dev);
- pmcraid_class = class_create(THIS_MODULE, PMCRAID_DEVFILE);
+ pmcraid_class = class_create(PMCRAID_DEVFILE);
if (IS_ERR(pmcraid_class)) {
error = PTR_ERR(pmcraid_class);
SG_MAX_DEVS, "sg");
if (rc)
return rc;
- sg_sysfs_class = class_create(THIS_MODULE, "scsi_generic");
+ sg_sysfs_class = class_create("scsi_generic");
if ( IS_ERR(sg_sysfs_class) ) {
rc = PTR_ERR(sg_sysfs_class);
goto err_out;
if (status < 0)
return status;
- spidev_class = class_create(THIS_MODULE, "spidev");
+ spidev_class = class_create("spidev");
if (IS_ERR(spidev_class)) {
unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
return PTR_ERR(spidev_class);
{
int err;
- controller_class = class_create(THIS_MODULE, "arcx_anybus_controller");
+ controller_class = class_create("arcx_anybus_controller");
if (IS_ERR(controller_class))
return PTR_ERR(controller_class);
err = platform_driver_register(&controller_driver);
{
int ret;
- cap_class = class_create(THIS_MODULE, "gb_authenticate");
+ cap_class = class_create("gb_authenticate");
if (IS_ERR(cap_class))
return PTR_ERR(cap_class);
{
int ret;
- fw_mgmt_class = class_create(THIS_MODULE, "gb_fw_mgmt");
+ fw_mgmt_class = class_create("gb_fw_mgmt");
if (IS_ERR(fw_mgmt_class))
return PTR_ERR(fw_mgmt_class);
dev_t dev;
int retval;
- raw_class = class_create(THIS_MODULE, "gb_raw");
+ raw_class = class_create("gb_raw");
if (IS_ERR(raw_class)) {
retval = PTR_ERR(raw_class);
goto error_class;
if (status < 0)
return status;
- pi433_class = class_create(THIS_MODULE, "pi433");
+ pi433_class = class_create("pi433");
if (IS_ERR(pi433_class)) {
unregister_chrdev(MAJOR(pi433_dev),
pi433_spi_driver.driver.name);
}
/* Create sysfs entries - on udev systems this creates the dev files */
- vme_user_sysfs_class = class_create(THIS_MODULE, driver_name);
+ vme_user_sysfs_class = class_create(driver_name);
if (IS_ERR(vme_user_sysfs_class)) {
dev_err(&vdev->dev, "Error creating vme_user class.\n");
err = PTR_ERR(vme_user_sysfs_class);
{
int rc;
- tee_class = class_create(THIS_MODULE, "tee");
+ tee_class = class_create("tee");
if (IS_ERR(tee_class)) {
pr_err("couldn't create class\n");
return PTR_ERR(tee_class);
static int __init tty_class_init(void)
{
- tty_class = class_create(THIS_MODULE, "tty");
+ tty_class = class_create("tty");
if (IS_ERR(tty_class))
return PTR_ERR(tty_class);
tty_class->devnode = tty_devnode;
if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
panic("unable to get major %d for vcs device", VCS_MAJOR);
- vc_class = class_create(THIS_MODULE, "vc");
+ vc_class = class_create("vc");
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 64), NULL, "vcsu");
{
int i;
- vtconsole_class = class_create(THIS_MODULE, "vtconsole");
+ vtconsole_class = class_create("vtconsole");
if (IS_ERR(vtconsole_class)) {
pr_warn("Unable to create vt console class; errno = %ld\n",
PTR_ERR(vtconsole_class));
}
kref_init(&usb_class->kref);
- usb_class->class = class_create(THIS_MODULE, "usbmisc");
+ usb_class->class = class_create("usbmisc");
if (IS_ERR(usb_class->class)) {
result = PTR_ERR(usb_class->class);
printk(KERN_ERR "class_create failed for usb devices\n");
int status;
dev_t dev;
- hidg_class = class_create(THIS_MODULE, "hidg");
+ hidg_class = class_create("hidg");
if (IS_ERR(hidg_class)) {
status = PTR_ERR(hidg_class);
hidg_class = NULL;
int status;
dev_t devt;
- usb_gadget_class = class_create(THIS_MODULE, "usb_printer_gadget");
+ usb_gadget_class = class_create("usb_printer_gadget");
if (IS_ERR(usb_gadget_class)) {
status = PTR_ERR(usb_gadget_class);
usb_gadget_class = NULL;
{
int rc;
- udc_class = class_create(THIS_MODULE, "udc");
+ udc_class = class_create("udc");
if (IS_ERR(udc_class)) {
pr_err("failed to create udc class --> %ld\n",
PTR_ERR(udc_class));
{
int rc;
- mon_bin_class = class_create(THIS_MODULE, "usbmon");
+ mon_bin_class = class_create("usbmon");
if (IS_ERR(mon_bin_class)) {
rc = PTR_ERR(mon_bin_class);
goto err_class;
static int __init usb_roles_init(void)
{
- role_class = class_create(THIS_MODULE, "usb_role");
+ role_class = class_create("usb_role");
return PTR_ERR_OR_ZERO(role_class);
}
subsys_initcall(usb_roles_init);
int ret;
struct device *dev;
- vduse_class = class_create(THIS_MODULE, "vduse");
+ vduse_class = class_create("vduse");
if (IS_ERR(vduse_class))
return PTR_ERR(vduse_class);
return ret;
/* /dev/vfio/$GROUP */
- vfio.class = class_create(THIS_MODULE, "vfio");
+ vfio.class = class_create("vfio");
if (IS_ERR(vfio.class)) {
ret = PTR_ERR(vfio.class);
goto err_group_class;
goto err_virqfd;
/* /sys/class/vfio-dev/vfioX */
- vfio.device_class = class_create(THIS_MODULE, "vfio-dev");
+ vfio.device_class = class_create("vfio-dev");
if (IS_ERR(vfio.device_class)) {
ret = PTR_ERR(vfio.device_class);
goto err_dev_class;
static int __init backlight_class_init(void)
{
- backlight_class = class_create(THIS_MODULE, "backlight");
+ backlight_class = class_create("backlight");
if (IS_ERR(backlight_class)) {
pr_warn("Unable to create backlight class; errno = %ld\n",
PTR_ERR(backlight_class));
static int __init lcd_class_init(void)
{
- lcd_class = class_create(THIS_MODULE, "lcd");
+ lcd_class = class_create("lcd");
if (IS_ERR(lcd_class)) {
pr_warn("Unable to create backlight class; errno = %ld\n",
PTR_ERR(lcd_class));
goto err_chrdev;
}
- fb_class = class_create(THIS_MODULE, "graphics");
+ fb_class = class_create("graphics");
if (IS_ERR(fb_class)) {
ret = PTR_ERR(fb_class);
pr_warn("Unable to create fb class; errno = %d\n", ret);
__func__, CODA_PSDEV_MAJOR);
return -EIO;
}
- coda_psdev_class = class_create(THIS_MODULE, "coda");
+ coda_psdev_class = class_create("coda");
if (IS_ERR(coda_psdev_class)) {
err = PTR_ERR(coda_psdev_class);
goto out_chrdev;
/* CUSE is not prepared for FUSE_DEV_IOC_CLONE */
cuse_channel_fops.unlocked_ioctl = NULL;
- cuse_class = class_create(THIS_MODULE, "cuse");
+ cuse_class = class_create("cuse");
if (IS_ERR(cuse_class))
return PTR_ERR(cuse_class);
goto err;
}
- pmsg_class = class_create(THIS_MODULE, PMSG_NAME);
+ pmsg_class = class_create(PMSG_NAME);
if (IS_ERR(pmsg_class)) {
pr_err("device class file already in use\n");
goto err_class;
/**
* class_create - create a struct class structure
- * @owner: dummy pointer, does nothing, will be removed soon.
* @name: pointer to a string for the name of this class.
*
* This is used to create a struct class pointer that can then be used
* Note, the pointer created here is to be destroyed when finished by
* making a call to class_destroy().
*/
-#define class_create(owner, name) \
+#define class_create(name) \
({ \
static struct lock_class_key __key; \
__class_create(name, &__key); \
static __init int bdi_class_init(void)
{
- bdi_class = class_create(THIS_MODULE, "bdi");
+ bdi_class = class_create("bdi");
if (IS_ERR(bdi_class))
return PTR_ERR(bdi_class);
int __init bt_sysfs_init(void)
{
- bt_class = class_create(THIS_MODULE, "bluetooth");
+ bt_class = class_create("bluetooth");
return PTR_ERR_OR_ZERO(bt_class);
}
{
int err;
- idletimer_tg_class = class_create(THIS_MODULE, "xt_idletimer");
+ idletimer_tg_class = class_create("xt_idletimer");
err = PTR_ERR(idletimer_tg_class);
if (IS_ERR(idletimer_tg_class)) {
pr_debug("couldn't register device class\n");
if (ret)
goto err_cdev;
- mbochs_class = class_create(THIS_MODULE, MBOCHS_CLASS_NAME);
+ mbochs_class = class_create(MBOCHS_CLASS_NAME);
if (IS_ERR(mbochs_class)) {
pr_err("Error: failed to register mbochs_dev class\n");
ret = PTR_ERR(mbochs_class);
if (ret)
goto err_cdev;
- mdpy_class = class_create(THIS_MODULE, MDPY_CLASS_NAME);
+ mdpy_class = class_create(MDPY_CLASS_NAME);
if (IS_ERR(mdpy_class)) {
pr_err("Error: failed to register mdpy_dev class\n");
ret = PTR_ERR(mdpy_class);
if (ret)
goto err_cdev;
- mtty_dev.vd_class = class_create(THIS_MODULE, MTTY_CLASS_NAME);
+ mtty_dev.vd_class = class_create(MTTY_CLASS_NAME);
if (IS_ERR(mtty_dev.vd_class)) {
pr_err("Error: failed to register mtty_dev class\n");
if (rc)
return rc;
- sound_class = class_create(THIS_MODULE, "sound");
+ sound_class = class_create("sound");
if (IS_ERR(sound_class)) {
cleanup_oss_soundcore();
return PTR_ERR(sound_class);
nfit_test_setup(ndtest_resource_lookup, NULL);
- ndtest_dimm_class = class_create(THIS_MODULE, "nfit_test_dimm");
+ ndtest_dimm_class = class_create("nfit_test_dimm");
if (IS_ERR(ndtest_dimm_class)) {
rc = PTR_ERR(ndtest_dimm_class);
goto err_register;
if (!nfit_wq)
return -ENOMEM;
- nfit_test_dimm = class_create(THIS_MODULE, "nfit_test_dimm");
+ nfit_test_dimm = class_create("nfit_test_dimm");
if (IS_ERR(nfit_test_dimm)) {
rc = PTR_ERR(nfit_test_dimm);
goto err_register;