driver core: class: remove module * from class_create()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2023 18:18:35 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 14:16:33 +0000 (15:16 +0100)
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>
140 files changed:
arch/mips/kernel/mips-mt.c
arch/mips/sibyte/common/sb_tbprof.c
arch/powerpc/platforms/book3s/vas-api.c
arch/x86/kernel/cpu/resctrl/pseudo_lock.c
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c
block/bsg.c
drivers/accel/drm_accel.c
drivers/accel/habanalabs/common/habanalabs_drv.c
drivers/base/power/wakeup_stats.c
drivers/block/aoe/aoechr.c
drivers/block/rnbd/rnbd-clt-sysfs.c
drivers/block/rnbd/rnbd-srv-sysfs.c
drivers/block/ublk_drv.c
drivers/char/bsr.c
drivers/char/dsp56k.c
drivers/char/ipmi/ipmi_devintf.c
drivers/char/lp.c
drivers/char/mem.c
drivers/char/misc.c
drivers/char/pcmcia/cm4000_cs.c
drivers/char/pcmcia/cm4040_cs.c
drivers/char/pcmcia/scr24x_cs.c
drivers/char/ppdev.c
drivers/char/tpm/tpm-interface.c
drivers/char/virtio_console.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/char/xillybus/xillybus_class.c
drivers/comedi/comedi_fops.c
drivers/comedi/drivers/comedi_test.c
drivers/crypto/qat/qat_common/adf_ctl_drv.c
drivers/dca/dca-sysfs.c
drivers/devfreq/devfreq-event.c
drivers/devfreq/devfreq.c
drivers/dma-buf/dma-heap.c
drivers/extcon/extcon.c
drivers/fpga/fpga-bridge.c
drivers/fpga/fpga-mgr.c
drivers/fpga/fpga-region.c
drivers/gnss/core.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/display/drm_dp_aux_dev.c
drivers/gpu/drm/drm_sysfs.c
drivers/hid/hid-roccat-arvo.c
drivers/hid/hid-roccat-isku.c
drivers/hid/hid-roccat-kone.c
drivers/hid/hid-roccat-koneplus.c
drivers/hid/hid-roccat-konepure.c
drivers/hid/hid-roccat-kovaplus.c
drivers/hid/hid-roccat-pyra.c
drivers/hid/hid-roccat-ryos.c
drivers/hid/hid-roccat-savu.c
drivers/hid/hidraw.c
drivers/i2c/i2c-dev.c
drivers/infiniband/core/uverbs_main.c
drivers/infiniband/hw/hfi1/device.c
drivers/infiniband/hw/qib/qib_file_ops.c
drivers/infiniband/ulp/rtrs/rtrs-clt.c
drivers/infiniband/ulp/rtrs/rtrs-srv.c
drivers/isdn/capi/capi.c
drivers/isdn/mISDN/dsp_pipeline.c
drivers/leds/led-class.c
drivers/macintosh/adb.c
drivers/media/dvb-core/dvbdev.c
drivers/media/rc/lirc_dev.c
drivers/misc/c2port/core.c
drivers/misc/cxl/file.c
drivers/misc/genwqe/card_base.c
drivers/misc/hpilo.c
drivers/misc/mei/main.c
drivers/misc/ocxl/file.c
drivers/misc/phantom.c
drivers/misc/uacce/uacce.c
drivers/most/most_cdev.c
drivers/net/ethernet/hisilicon/hns/hnae.c
drivers/net/ppp/ppp_generic.c
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wwan/wwan_core.c
drivers/net/wwan/wwan_hwsim.c
drivers/nvdimm/bus.c
drivers/nvme/host/core.c
drivers/nvme/host/fabrics.c
drivers/nvme/target/fcloop.c
drivers/pci/endpoint/pci-epc-core.c
drivers/pci/switch/switchtec.c
drivers/phy/phy-core.c
drivers/power/supply/power_supply_core.c
drivers/pps/pps.c
drivers/ptp/ptp_clock.c
drivers/rapidio/devices/rio_mport_cdev.c
drivers/rapidio/rio_cm.c
drivers/rpmsg/rpmsg_core.c
drivers/rtc/class.c
drivers/s390/char/hmcdrv_dev.c
drivers/s390/char/raw3270.c
drivers/s390/char/tape_class.c
drivers/s390/char/vmlogrdr.c
drivers/s390/char/vmur.c
drivers/s390/crypto/zcrypt_api.c
drivers/sbus/char/oradax.c
drivers/scsi/ch.c
drivers/scsi/cxlflash/main.c
drivers/scsi/pmcraid.c
drivers/scsi/sg.c
drivers/spi/spidev.c
drivers/staging/fieldbus/anybuss/arcx-anybus.c
drivers/staging/greybus/authentication.c
drivers/staging/greybus/fw-management.c
drivers/staging/greybus/raw.c
drivers/staging/pi433/pi433_if.c
drivers/staging/vme_user/vme_user.c
drivers/tee/tee_core.c
drivers/tty/tty_io.c
drivers/tty/vt/vc_screen.c
drivers/tty/vt/vt.c
drivers/usb/core/file.c
drivers/usb/gadget/function/f_hid.c
drivers/usb/gadget/function/f_printer.c
drivers/usb/gadget/udc/core.c
drivers/usb/mon/mon_bin.c
drivers/usb/roles/class.c
drivers/vdpa/vdpa_user/vduse_dev.c
drivers/vfio/group.c
drivers/vfio/vfio_main.c
drivers/video/backlight/backlight.c
drivers/video/backlight/lcd.c
drivers/video/fbdev/core/fbmem.c
fs/coda/psdev.c
fs/fuse/cuse.c
fs/pstore/pmsg.c
include/linux/device/class.h
mm/backing-dev.c
net/bluetooth/hci_sysfs.c
net/netfilter/xt_IDLETIMER.c
samples/vfio-mdev/mbochs.c
samples/vfio-mdev/mdpy.c
samples/vfio-mdev/mtty.c
sound/sound_core.c
tools/testing/nvdimm/test/ndtest.c
tools/testing/nvdimm/test/nfit.c

index dc023a9..f88b791 100644 (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);
 
index bc47681..ac376df 100644 (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;
index 36c2164..77ea933 100644 (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);
index 524f8ff..458cb74 100644 (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");
index 621ba9c..bdc0d55 100644 (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;
index 7087513..7bb17d3 100644 (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;
index 30fcc86..7eca43f 100644 (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;
index 1b69824..4a9baf0 100644 (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);
 
index 03dae57..3538e89 100644 (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);
index 924fac4..6732ed2 100644 (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);
 }
index 7a368c9..4c666f7 100644 (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);
index e7c7d9a..8c60879 100644 (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);
 
index 297a692..d5d9267 100644 (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);
 
index d1d1c8d..2eb4641 100644 (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;
index d5f9439..ff429ba 100644 (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);
index 06749e2..b3eaf3e 100644 (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;
index d160fa4..73e5a9e 100644 (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);
index 38aad99..70cfc51 100644 (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;
index ffb101d..f494d31 100644 (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);
 
index 7a1388b..1c44c29 100644 (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;
index e656f42..7f96d85 100644 (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);
 
index 8277119..11ff59e 100644 (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);
 
index 1bdce08..870781f 100644 (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);
 
index 38b46c7..81ed581 100644 (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;
index 7e513b7..8763c82 100644 (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);
index d5ac4d9..b65c809 100644 (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);
index 74a4928..a46f637 100644 (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);
index e9a288e..89926fe 100644 (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");
index b982903..8e43918 100644 (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");
index 0b5c0af..c02dc19 100644 (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;
index 9190532..75a50fd 100644 (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;
index 21ebd0a..fcc83ed 100644 (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);
index f041edc..3ebac24 100644 (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);
index 817c71d..e36cbb9 100644 (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);
index c9e41e8..84ae708 100644 (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);
index e1c7135..d43ba8e 100644 (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;
index 5cd40ac..6a521c8 100644 (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);
 
index 8efa676..eb583f8 100644 (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);
 
index 27ff9de..ccf6fda 100644 (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);
 
index 77a4b28..48f2ee0 100644 (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);
index a0e30f2..20e75bd 100644 (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;
index 098e482..29555b9 100644 (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);
        }
index 1831303..3c22a80 100644 (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);
 
index d94ee05..ea6b79b 100644 (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;
index e95d59c..3903a2c 100644 (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;
index 76da048..945ae23 100644 (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;
index 1896c69..97b83b6 100644 (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;
index cf8eeb3..a297756 100644 (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;
index 6fb9b95..1a1d96e 100644 (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;
index 4fcc8e7..15528c3 100644 (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;
index 5bf1971..0eb17a3 100644 (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;
index a784bb4..93be7ac 100644 (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;
index 197b1e7..93e62b1 100644 (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;
index 107623c..ef93064 100644 (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;
index bdb179a..fbace69 100644 (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");
index 1f44960..05be0d1 100644 (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",
index 80fe92a..c07c95f 100644 (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);
index 80abf45..edb2e3a 100644 (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);
index d1703e2..c38901e 100644 (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;
index 0f00be6..45a4043 100644 (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();
index cfbcd9e..09b72f1 100644 (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);
 
index a6b3adc..9255bc1 100644 (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;
index 23bd0c7..57e987c 100644 (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");
index 0ed087c..e9b3ce0 100644 (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;
index 25ab61d..043d23a 100644 (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);
index fb9a1b4..f574c83 100644 (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);
index 5878329..144d1f2 100644 (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);
index 5b63d17..0262828 100644 (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;
index 8d00df9..2c3a991 100644 (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;
index 632d4ae..76c771a 100644 (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);
index 3b05865..6e63f06 100644 (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);
index ce72e46..7966a6b 100644 (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");
index 0702339..346bd7c 100644 (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);
 
index 4ee5369..3ed8f46 100644 (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);
 
index 9b26f0f..8a1027a 100644 (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);
 }
 
index 1d71f52..a9beacd 100644 (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;
index 4cc4eaf..68a7e09 100644 (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;
index 966d0cc..51bbd6b 100644 (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;
index 2397a90..edb5fc8 100644 (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;
index 4976a00..954dbc1 100644 (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;
index c2730b1..877a61f 100644 (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;
index bbaa04a..0069ebf 100644 (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);
index 5c16372..af0d017 100644 (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);
index 9440d98..46c9a5c 100644 (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));
index 3d6f17f..d837da0 100644 (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;
index 9951efc..6464dcb 100644 (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));
index f3d7c1d..1bf3932 100644 (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);
index 22a65ad..5d19baa 100644 (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);
index 62d4d29..790f925 100644 (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);
index 43db495..deb96c3 100644 (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);
index db4c265..acaf9cd 100644 (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);
index a2207c0..5039df7 100644 (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);
index e5b7b48..edfd942 100644 (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);
index cb8fdf0..8d50c89 100644 (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);
index 09d7570..7115c0f 100644 (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);
index c21dc68..277a0f9 100644 (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;
 }
index ed970ec..6946ba9 100644 (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;
index 131293f..82efdd2 100644 (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;
index 6fe05bb..582ac30 100644 (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;
index e300cf2..75701b1 100644 (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);
index 72fe6df..ac648bb 100644 (file)
@@ -995,7 +995,7 @@ static int __init init_ch_module(void)
        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;
index 395b00b..debd369 100644 (file)
@@ -3880,7 +3880,7 @@ static int cxlflash_class_init(void)
 
        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);
index 836ddc4..7d57cc9 100644 (file)
@@ -5346,7 +5346,7 @@ static int __init pmcraid_init(void)
        }
 
        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);
index a910492..4997f88 100644 (file)
@@ -1677,7 +1677,7 @@ init_sg(void)
                                    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;
index 5a038c6..539e70c 100644 (file)
@@ -877,7 +877,7 @@ static int __init spidev_init(void)
        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);
index 9af2e63..369400e 100644 (file)
@@ -352,7 +352,7 @@ static int __init controller_init(void)
 {
        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);
index 297e69f..7e01790 100644 (file)
@@ -402,7 +402,7 @@ int cap_init(void)
 {
        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);
 
index 3342b84..cd9141e 100644 (file)
@@ -696,7 +696,7 @@ int fw_mgmt_init(void)
 {
        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);
 
index 2a375f4..8bca8cb 100644 (file)
@@ -340,7 +340,7 @@ static int raw_init(void)
        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;
index b59f6a4..f08fdf0 100644 (file)
@@ -1400,7 +1400,7 @@ static int __init pi433_init(void)
        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);
index 4e533c0..b9367b5 100644 (file)
@@ -614,7 +614,7 @@ static int vme_user_probe(struct vme_dev *vdev)
        }
 
        /* 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);
index 452cbb8..0eb342d 100644 (file)
@@ -1226,7 +1226,7 @@ static int __init tee_init(void)
 {
        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);
index 36fb945..1382d90 100644 (file)
@@ -3512,7 +3512,7 @@ static char *tty_devnode(const struct device *dev, umode_t *mode)
 
 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;
index 1dc07f9..498ba9c 100644 (file)
@@ -804,7 +804,7 @@ int __init vcs_init(void)
 
        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");
index 57a5c23..5496bf4 100644 (file)
@@ -4241,7 +4241,7 @@ static int __init vtconsole_class_init(void)
 {
        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));
index da7d88e..c4ed331 100644 (file)
@@ -88,7 +88,7 @@ static int init_usb_class(void)
        }
 
        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");
index a8da3b4..9f6b101 100644 (file)
@@ -1325,7 +1325,7 @@ int ghid_setup(struct usb_gadget *g, int count)
        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;
index 4903d76..28db3e3 100644 (file)
@@ -1512,7 +1512,7 @@ static int gprinter_setup(int count)
        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;
index 23b0629..df930b0 100644 (file)
@@ -1758,7 +1758,7 @@ static int __init usb_udc_init(void)
 {
        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));
index abb1cd3..952c567 100644 (file)
@@ -1379,7 +1379,7 @@ int __init mon_bin_init(void)
 {
        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;
index 56814ef..0395bd5 100644 (file)
@@ -392,7 +392,7 @@ EXPORT_SYMBOL_GPL(usb_role_switch_get_drvdata);
 
 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);
index 0c3b486..c421b83 100644 (file)
@@ -1793,7 +1793,7 @@ static int vduse_init(void)
        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);
 
index 27d5ba7..fc75c10 100644 (file)
@@ -878,7 +878,7 @@ int __init vfio_group_init(void)
                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;
index 43bd6b7..9ae671b 100644 (file)
@@ -1408,7 +1408,7 @@ static int __init vfio_init(void)
                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;
index 6eea72a..9a885d3 100644 (file)
@@ -751,7 +751,7 @@ static void __exit backlight_class_exit(void)
 
 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));
index db56e46..77c5cb2 100644 (file)
@@ -323,7 +323,7 @@ static void __exit lcd_class_exit(void)
 
 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));
index 875541f..b073795 100644 (file)
@@ -1749,7 +1749,7 @@ fbmem_init(void)
                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);
index b39580a..3c31485 100644 (file)
@@ -361,7 +361,7 @@ static int __init init_coda_psdev(void)
                       __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;
index 179a5c5..91e89e6 100644 (file)
@@ -623,7 +623,7 @@ static int __init cuse_init(void)
        /* 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);
 
index ab82e5f..aa17830 100644 (file)
@@ -64,7 +64,7 @@ void pstore_register_pmsg(void)
                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;
index bf736f1..cda598f 100644 (file)
@@ -256,7 +256,6 @@ extern void class_destroy(struct class *cls);
 
 /**
  * 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
@@ -267,7 +266,7 @@ extern void class_destroy(struct class *cls);
  * 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);           \
index a53b936..ad01130 100644 (file)
@@ -347,7 +347,7 @@ ATTRIBUTE_GROUPS(bdi_dev);
 
 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);
 
index 08542df..2934d7f 100644 (file)
@@ -112,7 +112,7 @@ void hci_init_sysfs(struct hci_dev *hdev)
 
 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);
 }
index 8d36303..db720ef 100644 (file)
@@ -490,7 +490,7 @@ static int __init idletimer_tg_init(void)
 {
        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");
index e54eb75..a3d3249 100644 (file)
@@ -1418,7 +1418,7 @@ static int __init mbochs_dev_init(void)
        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);
index e8400fd..ef1630f 100644 (file)
@@ -705,7 +705,7 @@ static int __init mdpy_dev_init(void)
        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);
index e887de6..0b6c386 100644 (file)
@@ -1316,7 +1316,7 @@ static int __init mtty_dev_init(void)
        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");
index 3e7dd6f..4f69112 100644 (file)
@@ -45,7 +45,7 @@ static int __init init_soundcore(void)
        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);
index 01ceb98..3eba10c 100644 (file)
@@ -921,7 +921,7 @@ static __init int ndtest_init(void)
 
        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;
index c75abb4..45b1c07 100644 (file)
@@ -3282,7 +3282,7 @@ static __init int nfit_test_init(void)
        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;