/Linux-v5.10/fs/fuse/ |
D | cuse.c | 78 static struct list_head *cuse_conntbl_head(dev_t devt) in cuse_conntbl_head() argument 80 return &cuse_conntbl[(MAJOR(devt) + MINOR(devt)) % CUSE_CONNTBL_LEN]; in cuse_conntbl_head() 116 dev_t devt = inode->i_cdev->dev; in cuse_open() local 122 list_for_each_entry(pos, cuse_conntbl_head(devt), list) in cuse_open() 123 if (pos->dev->devt == devt) { in cuse_open() 329 dev_t devt; in cuse_process_init_reply() local 348 devt = MKDEV(arg->dev_major, arg->dev_minor); in cuse_process_init_reply() 349 if (!MAJOR(devt)) in cuse_process_init_reply() 350 rc = alloc_chrdev_region(&devt, MINOR(devt), 1, devinfo.name); in cuse_process_init_reply() 352 rc = register_chrdev_region(devt, 1, devinfo.name); in cuse_process_init_reply() [all …]
|
/Linux-v5.10/block/ |
D | genhd.c | 571 int blk_alloc_devt(struct hd_struct *part, dev_t *devt) in blk_alloc_devt() argument 578 *devt = MKDEV(disk->major, disk->first_minor + part->partno); in blk_alloc_devt() 593 *devt = MKDEV(BLOCK_EXT_MAJOR, blk_mangle_minor(idx)); in blk_alloc_devt() 606 void blk_free_devt(dev_t devt) in blk_free_devt() argument 608 if (devt == MKDEV(0, 0)) in blk_free_devt() 611 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { in blk_free_devt() 613 idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); in blk_free_devt() 621 void blk_invalidate_devt(dev_t devt) in blk_invalidate_devt() argument 623 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { in blk_invalidate_devt() 625 idr_replace(&ext_devt_idr, NULL, blk_mangle_minor(MINOR(devt))); in blk_invalidate_devt() [all …]
|
/Linux-v5.10/arch/powerpc/platforms/powernv/ |
D | vas-api.c | 42 dev_t devt; member 216 rc = alloc_chrdev_region(&coproc_device.devt, 1, 1, name); in vas_register_coproc_api() 223 MAJOR(coproc_device.devt), MINOR(coproc_device.devt)); in vas_register_coproc_api() 237 devno = MKDEV(MAJOR(coproc_device.devt), 0); in vas_register_coproc_api() 262 unregister_chrdev_region(coproc_device.devt, 1); in vas_register_coproc_api() 272 devno = MKDEV(MAJOR(coproc_device.devt), 0); in vas_unregister_coproc_api() 276 unregister_chrdev_region(coproc_device.devt, 1); in vas_unregister_coproc_api()
|
/Linux-v5.10/fs/pstore/ |
D | blk.c | 96 dev_t devt; member 238 dev_t devt; in psblk_get_bdev() local 240 devt = name_to_dev_t(blkdev); in psblk_get_bdev() 241 if (devt == 0) in psblk_get_bdev() 243 bdev = blkdev_get_by_dev(devt, mode, holder); in psblk_get_bdev() 256 info->devt = bdev->bd_dev; in psblk_get_bdev() 381 if (!binfo.devt || (!best_effort && in __register_pstore_blk() 382 MAJOR(binfo.devt) != info->major)) { in __register_pstore_blk() 384 info->major, MAJOR(binfo.devt)); in __register_pstore_blk() 394 info->devt = binfo.devt; in __register_pstore_blk()
|
/Linux-v5.10/drivers/char/xilinx_hwicap/ |
D | xilinx_hwicap.c | 607 dev_t devt; in hwicap_setup() local 635 devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR + id); in hwicap_setup() 662 drvdata->devt = devt; in hwicap_setup() 684 retval = cdev_add(&drvdata->cdev, devt, 1); in hwicap_setup() 690 device_create(icap_class, dev, devt, NULL, "%s%d", DRIVER_NAME, id); in hwicap_setup() 733 device_destroy(icap_class, drvdata->devt); in hwicap_remove() 740 probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = 0; in hwicap_remove() 856 dev_t devt; in hwicap_module_init() local 862 devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR); in hwicap_module_init() 863 retval = register_chrdev_region(devt, in hwicap_module_init() [all …]
|
/Linux-v5.10/drivers/dma/idxd/ |
D | cdev.c | 20 dev_t devt; member 198 return MAJOR(ictx[idxd->type].devt); in idxd_cdev_get_major() 227 dev->devt = MKDEV(MAJOR(cdev_ctx->devt), minor); in idxd_wq_cdev_dev_setup() 239 ida_simple_remove(&cdev_ctx->minor_ida, MINOR(dev->devt)); in idxd_wq_cdev_dev_setup() 279 rc = cdev_add(cdev, dev->devt, 1); in idxd_wq_add_cdev() 301 rc = alloc_chrdev_region(&ictx[i].devt, 0, MINORMASK, in idxd_cdev_register() 315 unregister_chrdev_region(ictx[i].devt, MINORMASK); in idxd_cdev_remove()
|
/Linux-v5.10/drivers/net/ipvlan/ |
D | ipvtap.c | 143 dev_t devt; in ipvtap_device_event() local 163 devt = MKDEV(MAJOR(ipvtap_major), vlantap->tap.minor); in ipvtap_device_event() 164 classdev = device_create(&ipvtap_class, &dev->dev, devt, in ipvtap_device_event() 180 devt = MKDEV(MAJOR(ipvtap_major), vlantap->tap.minor); in ipvtap_device_event() 181 device_destroy(&ipvtap_class, devt); in ipvtap_device_event()
|
/Linux-v5.10/drivers/net/ |
D | macvtap.c | 150 dev_t devt; in macvtap_device_event() local 170 devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor); in macvtap_device_event() 171 classdev = device_create(&macvtap_class, &dev->dev, devt, in macvtap_device_event() 187 devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor); in macvtap_device_event() 188 device_destroy(&macvtap_class, devt); in macvtap_device_event()
|
/Linux-v5.10/drivers/dax/ |
D | super.c | 519 dev_t devt = *(dev_t *) data; in dax_test() local 521 return inode->i_rdev == devt; in dax_test() 526 dev_t devt = *(dev_t *) data; in dax_set() local 528 inode->i_rdev = devt; in dax_set() 532 static struct dax_device *dax_dev_get(dev_t devt) in dax_dev_get() argument 537 inode = iget5_locked(dax_superblock, hash_32(devt + DAXFS_MAGIC, 31), in dax_dev_get() 538 dax_test, dax_set, &devt); in dax_dev_get() 580 dev_t devt; in alloc_dax() local 598 devt = MKDEV(MAJOR(dax_devt), minor); in alloc_dax() 599 dax_dev = dax_dev_get(devt); in alloc_dax()
|
/Linux-v5.10/drivers/staging/axis-fifo/ |
D | axis-fifo.c | 144 dev_t devt; /* our char device number */ member 909 rc = alloc_chrdev_region(&fifo->devt, 0, 1, DRIVER_NAME); in axis_fifo_probe() 913 MAJOR(fifo->devt), MINOR(fifo->devt)); in axis_fifo_probe() 916 fifo->device = device_create(axis_fifo_driver_class, NULL, fifo->devt, in axis_fifo_probe() 928 rc = cdev_add(&fifo->char_device, fifo->devt, 1); in axis_fifo_probe() 943 MAJOR(fifo->devt), MINOR(fifo->devt)); in axis_fifo_probe() 950 device_destroy(axis_fifo_driver_class, fifo->devt); in axis_fifo_probe() 952 unregister_chrdev_region(fifo->devt, 1); in axis_fifo_probe() 965 device_destroy(axis_fifo_driver_class, fifo->devt); in axis_fifo_remove() 966 unregister_chrdev_region(fifo->devt, 1); in axis_fifo_remove()
|
/Linux-v5.10/drivers/remoteproc/ |
D | remoteproc_cdev.c | 103 rproc->dev.devt = MKDEV(MAJOR(rproc_major), rproc->index); in rproc_char_device_add() 105 ret = cdev_add(&rproc->cdev, rproc->dev.devt, 1); in rproc_char_device_add() 114 __unregister_chrdev(MAJOR(rproc->dev.devt), rproc->index, 1, "remoteproc"); in rproc_char_device_remove()
|
/Linux-v5.10/include/linux/ |
D | genhd.h | 250 return part_to_dev(part)->devt; in part_devt() 346 extern void blk_register_region(dev_t devt, unsigned long range, 351 extern void blk_unregister_region(dev_t devt, unsigned long range); 407 dev_t devt = MKDEV(0, 0); in blk_lookup_devt() local 408 return devt; in blk_lookup_devt()
|
/Linux-v5.10/drivers/rpmsg/ |
D | rpmsg_char.c | 334 ida_simple_remove(&rpmsg_minor_ida, MINOR(eptdev->dev.devt)); in rpmsg_eptdev_release_device() 372 dev->devt = MKDEV(MAJOR(rpmsg_major), ret); in rpmsg_eptdev_create() 380 ret = cdev_add(&eptdev->cdev, dev->devt, 1); in rpmsg_eptdev_create() 398 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_eptdev_create() 460 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_ctrldev_release_device() 488 dev->devt = MKDEV(MAJOR(rpmsg_major), ret); in rpmsg_chrdev_probe() 496 ret = cdev_add(&ctrldev->cdev, dev->devt, 1); in rpmsg_chrdev_probe() 516 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_chrdev_probe()
|
/Linux-v5.10/drivers/char/tpm/ |
D | tpm-chip.c | 367 chip->dev.devt = MKDEV(MISC_MAJOR, TPM_MINOR); in tpm_chip_alloc() 369 chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num); in tpm_chip_alloc() 371 chip->devs.devt = in tpm_chip_alloc() 442 dev_name(&chip->dev), MAJOR(chip->dev.devt), in tpm_add_char_device() 443 MINOR(chip->dev.devt), rc); in tpm_add_char_device() 452 dev_name(&chip->devs), MAJOR(chip->devs.devt), in tpm_add_char_device() 453 MINOR(chip->devs.devt), rc); in tpm_add_char_device()
|
/Linux-v5.10/sound/usb/ |
D | media.c | 76 MAJOR(pcm_dev->devt), in snd_media_stream_init() 77 MINOR(pcm_dev->devt)); in snd_media_stream_init() 180 MAJOR(ctl_dev->devt), in snd_media_mixer_init() 181 MINOR(ctl_dev->devt)); in snd_media_mixer_init()
|
/Linux-v5.10/drivers/pps/ |
D | pps.c | 350 dev_t devt; in pps_register_cdev() local 369 devt = MKDEV(MAJOR(pps_devt), pps->id); in pps_register_cdev() 374 err = cdev_add(&pps->cdev, devt, 1); in pps_register_cdev() 380 pps->dev = device_create(pps_class, pps->info.dev, devt, pps, in pps_register_cdev() 410 device_destroy(pps_class, pps->dev->devt); in pps_unregister_cdev()
|
/Linux-v5.10/drivers/misc/cxl/ |
D | flash.c | 522 dev_t devt; in cxl_guest_add_chardev() local 525 devt = MKDEV(MAJOR(cxl_get_dev()), CXL_CARD_MINOR(adapter)); in cxl_guest_add_chardev() 527 if ((rc = cdev_add(&adapter->guest->cdev, devt, 1))) { in cxl_guest_add_chardev() 533 adapter->dev.devt = devt; in cxl_guest_add_chardev()
|
/Linux-v5.10/drivers/mtd/devices/ |
D | block2mtd.c | 243 dev_t devt; in add_device() local 254 devt = name_to_dev_t(devname); in add_device() 255 if (!devt) in add_device() 257 bdev = blkdev_get_by_dev(devt, mode, dev); in add_device()
|
/Linux-v5.10/include/linux/device/ |
D | driver.h | 207 dev_t devt) in driver_find_device_by_devt() argument 209 return driver_find_device(drv, NULL, &devt, device_match_devt); in driver_find_device_by_devt()
|
D | bus.h | 210 dev_t devt) in bus_find_device_by_devt() argument 212 return bus_find_device(bus, NULL, &devt, device_match_devt); in bus_find_device_by_devt()
|
/Linux-v5.10/drivers/gpio/ |
D | gpiolib-cdev.h | 10 int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
|
/Linux-v5.10/block/partitions/ |
D | core.c | 261 blk_free_devt(dev->devt); in part_release() 368 dev_t devt = MKDEV(0, 0); in add_partition() local 442 err = blk_alloc_devt(p, &devt); in add_partition() 445 pdev->devt = devt; in add_partition() 695 md_autodetect_dev(part_to_dev(part)->devt); in blk_add_partition()
|
/Linux-v5.10/drivers/spi/ |
D | spidev.c | 69 dev_t devt; member 570 if (spidev->devt == inode->i_rdev) { in spidev_open() 766 spidev->devt = MKDEV(SPIDEV_MAJOR, minor); in spidev_probe() 767 dev = device_create(spidev_class, &spi->dev, spidev->devt, in spidev_probe() 803 device_destroy(spidev_class, spidev->devt); in spidev_remove() 804 clear_bit(MINOR(spidev->devt), minors); in spidev_remove()
|
/Linux-v5.10/drivers/s390/crypto/ |
D | zcrypt_api.c | 156 static inline struct zcdn_device *find_zcdndev_by_devt(dev_t devt) in find_zcdndev_by_devt() argument 158 struct device *dev = class_find_device_by_devt(zcrypt_class, devt); in find_zcdndev_by_devt() 346 MAJOR(dev->devt), MINOR(dev->devt)); in zcdn_device_release() 353 dev_t devt; in zcdn_create() local 373 devt = MKDEV(MAJOR(zcrypt_devt), MINOR(zcrypt_devt) + i); in zcdn_create() 374 zcdndev = find_zcdndev_by_devt(devt); in zcdn_create() 393 zcdndev->device.devt = devt; in zcdn_create() 399 ZCRYPT_NAME "_%d", (int) MINOR(devt)); in zcdn_create() 412 MAJOR(devt), MINOR(devt)); in zcdn_create() 449 dev_t devt; in zcdn_destroy_all() local [all …]
|
/Linux-v5.10/drivers/base/ |
D | core.c | 1872 if (MAJOR(dev->devt)) { in dev_uevent() 1879 add_uevent_var(env, "MAJOR=%u", MAJOR(dev->devt)); in dev_uevent() 1880 add_uevent_var(env, "MINOR=%u", MINOR(dev->devt)); in dev_uevent() 2240 return print_dev_t(buf, dev->devt); in dev_show() 2758 format_dev_t(devt_str, dev->devt); in device_create_sys_dev_entry() 2771 format_dev_t(devt_str, dev->devt); in device_remove_sys_dev_entry() 2898 if (MAJOR(dev->devt)) { in device_add() 2958 if (MAJOR(dev->devt)) in device_add() 3095 if (MAJOR(dev->devt)) { in device_del() 3558 dev_t devt, void *drvdata, in device_create_groups_vargs() argument [all …]
|