Home
last modified time | relevance | path

Searched refs:devt (Results 1 – 25 of 126) sorted by relevance

123456

/kernel/linux/linux-5.10/fs/fuse/
Dcuse.c78 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 …]
/kernel/linux/linux-5.10/block/
Dgenhd.c574 int blk_alloc_devt(struct hd_struct *part, dev_t *devt) in blk_alloc_devt() argument
581 *devt = MKDEV(disk->major, disk->first_minor + part->partno); in blk_alloc_devt()
596 *devt = MKDEV(BLOCK_EXT_MAJOR, blk_mangle_minor(idx)); in blk_alloc_devt()
609 void blk_free_devt(dev_t devt) in blk_free_devt() argument
611 if (devt == MKDEV(0, 0)) in blk_free_devt()
614 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { in blk_free_devt()
616 idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); in blk_free_devt()
624 void blk_invalidate_devt(dev_t devt) in blk_invalidate_devt() argument
626 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { in blk_invalidate_devt()
628 idr_replace(&ext_devt_idr, NULL, blk_mangle_minor(MINOR(devt))); in blk_invalidate_devt()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/
Dvas-api.c42 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()
/kernel/linux/linux-5.10/fs/pstore/
Dblk.c105 dev_t devt; member
248 dev_t devt; in psblk_get_bdev() local
250 devt = name_to_dev_t(blkdev); in psblk_get_bdev()
251 if (devt == 0) in psblk_get_bdev()
253 bdev = blkdev_get_by_dev(devt, mode, holder); in psblk_get_bdev()
266 info->devt = bdev->bd_dev; in psblk_get_bdev()
391 if (!binfo.devt || (!best_effort && in __register_pstore_blk()
392 MAJOR(binfo.devt) != info->major)) { in __register_pstore_blk()
394 info->major, MAJOR(binfo.devt)); in __register_pstore_blk()
404 info->devt = binfo.devt; in __register_pstore_blk()
/kernel/linux/linux-5.10/drivers/char/xilinx_hwicap/
Dxilinx_hwicap.c607 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 …]
/kernel/linux/linux-5.10/drivers/dma/idxd/
Dcdev.c20 dev_t devt; member
194 return MAJOR(ictx[idxd->type].devt); in idxd_cdev_get_major()
225 dev->devt = MKDEV(MAJOR(cdev_ctx->devt), minor); in idxd_wq_add_cdev()
266 rc = alloc_chrdev_region(&ictx[i].devt, 0, MINORMASK, in idxd_cdev_register()
276 unregister_chrdev_region(ictx[i].devt, MINORMASK); in idxd_cdev_register()
286 unregister_chrdev_region(ictx[i].devt, MINORMASK); in idxd_cdev_remove()
/kernel/linux/linux-5.10/drivers/net/
Dmacvtap.c156 dev_t devt; in macvtap_device_event() local
176 devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor); in macvtap_device_event()
177 classdev = device_create(&macvtap_class, &dev->dev, devt, in macvtap_device_event()
193 devt = MKDEV(MAJOR(macvtap_major), vlantap->tap.minor); in macvtap_device_event()
194 device_destroy(&macvtap_class, devt); in macvtap_device_event()
/kernel/linux/linux-5.10/drivers/net/ipvlan/
Dipvtap.c143 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()
/kernel/linux/linux-5.10/include/linux/
Dgenhd.h250 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);
352 extern void blk_delete_region(dev_t devt, unsigned long range,
409 dev_t devt = MKDEV(0, 0); in blk_lookup_devt() local
410 return devt; in blk_lookup_devt()
/kernel/linux/linux-5.10/drivers/dax/
Dsuper.c519 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()
/kernel/linux/linux-5.10/drivers/staging/axis-fifo/
Daxis-fifo.c144 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()
/kernel/linux/linux-5.10/sound/usb/
Dmedia.c76 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()
/kernel/linux/linux-5.10/drivers/pps/
Dpps.c350 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()
/kernel/linux/linux-5.10/drivers/rpmsg/
Drpmsg_char.c334 ida_simple_remove(&rpmsg_minor_ida, MINOR(eptdev->dev.devt)); in rpmsg_eptdev_release_device()
371 dev->devt = MKDEV(MAJOR(rpmsg_major), ret); in rpmsg_eptdev_create()
391 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_eptdev_create()
453 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_ctrldev_release_device()
480 dev->devt = MKDEV(MAJOR(rpmsg_major), ret); in rpmsg_chrdev_probe()
502 ida_simple_remove(&rpmsg_minor_ida, MINOR(dev->devt)); in rpmsg_chrdev_probe()
/kernel/linux/linux-5.10/drivers/remoteproc/
Dremoteproc_cdev.c103 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()
/kernel/linux/linux-5.10/drivers/misc/cxl/
Dflash.c522 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()
/kernel/linux/linux-5.10/drivers/mtd/devices/
Dblock2mtd.c243 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()
/kernel/linux/linux-5.10/include/linux/device/
Ddriver.h207 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()
Dbus.h210 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()
/kernel/linux/linux-5.10/drivers/gpio/
Dgpiolib-cdev.h10 int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
/kernel/linux/linux-5.10/drivers/spi/
Dspidev.c69 dev_t devt; member
581 if (spidev->devt == inode->i_rdev) { in spidev_open()
777 spidev->devt = MKDEV(SPIDEV_MAJOR, minor); in spidev_probe()
778 dev = device_create(spidev_class, &spi->dev, spidev->devt, in spidev_probe()
814 device_destroy(spidev_class, spidev->devt); in spidev_remove()
815 clear_bit(MINOR(spidev->devt), minors); in spidev_remove()
/kernel/linux/linux-5.10/block/partitions/
Dcore.c261 blk_free_devt(dev->devt); in part_release()
375 dev_t devt = MKDEV(0, 0); in add_partition() local
449 err = blk_alloc_devt(p, &devt); in add_partition()
452 pdev->devt = devt; in add_partition()
711 md_autodetect_dev(part_to_dev(part)->devt); in blk_add_partition()
/kernel/linux/linux-5.10/drivers/char/tpm/
Dtpm-chip.c347 chip->dev.devt = MKDEV(MISC_MAJOR, TPM_MINOR); in tpm_chip_alloc()
349 chip->dev.devt = MKDEV(MAJOR(tpm_devt), chip->dev_num); in tpm_chip_alloc()
413 dev_name(&chip->dev), MAJOR(chip->dev.devt), in tpm_add_char_device()
414 MINOR(chip->dev.devt), rc); in tpm_add_char_device()
/kernel/linux/linux-5.10/drivers/s390/crypto/
Dzcrypt_api.c156 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 …]
/kernel/linux/linux-5.10/drivers/base/
Dcore.c1900 if (MAJOR(dev->devt)) { in dev_uevent()
1907 add_uevent_var(env, "MAJOR=%u", MAJOR(dev->devt)); in dev_uevent()
1908 add_uevent_var(env, "MINOR=%u", MINOR(dev->devt)); in dev_uevent()
2268 return print_dev_t(buf, dev->devt); in dev_show()
2787 format_dev_t(devt_str, dev->devt); in device_create_sys_dev_entry()
2800 format_dev_t(devt_str, dev->devt); in device_remove_sys_dev_entry()
2927 if (MAJOR(dev->devt)) { in device_add()
2987 if (MAJOR(dev->devt)) in device_add()
3124 if (MAJOR(dev->devt)) { in device_del()
3587 dev_t devt, void *drvdata, in device_create_groups_vargs() argument
[all …]

123456