tap_major 395 drivers/net/tap.c struct major_info *tap_major; tap_major 397 drivers/net/tap.c list_for_each_entry_rcu(tap_major, &major_list, next) { tap_major 398 drivers/net/tap.c if (tap_major->major == major) tap_major 399 drivers/net/tap.c return tap_major; tap_major 408 drivers/net/tap.c struct major_info *tap_major; tap_major 411 drivers/net/tap.c tap_major = tap_get_major(MAJOR(major)); tap_major 412 drivers/net/tap.c if (!tap_major) { tap_major 417 drivers/net/tap.c spin_lock(&tap_major->minor_lock); tap_major 418 drivers/net/tap.c retval = idr_alloc(&tap_major->minor_idr, tap, 1, TAP_NUM_DEVS, GFP_ATOMIC); tap_major 425 drivers/net/tap.c spin_unlock(&tap_major->minor_lock); tap_major 435 drivers/net/tap.c struct major_info *tap_major; tap_major 438 drivers/net/tap.c tap_major = tap_get_major(MAJOR(major)); tap_major 439 drivers/net/tap.c if (!tap_major) { tap_major 443 drivers/net/tap.c spin_lock(&tap_major->minor_lock); tap_major 445 drivers/net/tap.c idr_remove(&tap_major->minor_idr, tap->minor); tap_major 448 drivers/net/tap.c spin_unlock(&tap_major->minor_lock); tap_major 459 drivers/net/tap.c struct major_info *tap_major; tap_major 462 drivers/net/tap.c tap_major = tap_get_major(major); tap_major 463 drivers/net/tap.c if (!tap_major) { tap_major 468 drivers/net/tap.c spin_lock(&tap_major->minor_lock); tap_major 469 drivers/net/tap.c tap = idr_find(&tap_major->minor_idr, minor); tap_major 474 drivers/net/tap.c spin_unlock(&tap_major->minor_lock); tap_major 1317 drivers/net/tap.c struct major_info *tap_major; tap_major 1319 drivers/net/tap.c tap_major = kzalloc(sizeof(*tap_major), GFP_ATOMIC); tap_major 1320 drivers/net/tap.c if (!tap_major) tap_major 1323 drivers/net/tap.c tap_major->major = MAJOR(major); tap_major 1325 drivers/net/tap.c idr_init(&tap_major->minor_idr); tap_major 1326 drivers/net/tap.c spin_lock_init(&tap_major->minor_lock); tap_major 1328 drivers/net/tap.c tap_major->device_name = device_name; tap_major 1330 drivers/net/tap.c list_add_tail_rcu(&tap_major->next, &major_list); tap_major 1334 drivers/net/tap.c int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major, tap_major 1339 drivers/net/tap.c err = alloc_chrdev_region(tap_major, 0, TAP_NUM_DEVS, device_name); tap_major 1345 drivers/net/tap.c err = cdev_add(tap_cdev, *tap_major, TAP_NUM_DEVS); tap_major 1349 drivers/net/tap.c err = tap_list_add(*tap_major, device_name); tap_major 1358 drivers/net/tap.c unregister_chrdev_region(*tap_major, TAP_NUM_DEVS); tap_major 1366 drivers/net/tap.c struct major_info *tap_major, *tmp; tap_major 1370 drivers/net/tap.c list_for_each_entry_safe(tap_major, tmp, &major_list, next) { tap_major 1371 drivers/net/tap.c if (tap_major->major == MAJOR(major)) { tap_major 1372 drivers/net/tap.c idr_destroy(&tap_major->minor_idr); tap_major 1373 drivers/net/tap.c list_del_rcu(&tap_major->next); tap_major 1374 drivers/net/tap.c kfree_rcu(tap_major, rcu); tap_major 80 include/linux/if_tap.h int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major,