Home
last modified time | relevance | path

Searched refs:open_count (Results 1 – 25 of 36) sorted by relevance

12

/drivers/usb/misc/
Dadutux.c81 int open_count; /* number of times this port has been opened */ member
254 if (dev->open_count) { in adu_open()
259 ++dev->open_count; in adu_open()
261 dev->open_count); in adu_open()
297 --dev->open_count; in adu_release_internal()
299 dev->open_count); in adu_release_internal()
300 if (dev->open_count <= 0) { in adu_release_internal()
302 dev->open_count = 0; in adu_release_internal()
324 if (dev->open_count <= 0) { in adu_release()
333 if (!dev->open_count) /* ... and we're the last user */ in adu_release()
[all …]
Dldusb.c162 int open_count; /* number of times this port has been opened */ member
331 if (dev->open_count) { in ld_usb_open()
335 dev->open_count = 1; in ld_usb_open()
358 dev->open_count = 0; in ld_usb_open()
388 if (dev->open_count != 1) { in ld_usb_release()
404 dev->open_count = 0; in ld_usb_release()
773 if (!dev->open_count) { in ld_usb_disconnect()
Dlegousbtower.c196 int open_count; /* number of times this port has been opened */ member
352 if (dev->open_count) { in tower_open()
401 dev->open_count = 1; in tower_open()
428 if (dev->open_count != 1) { in tower_release()
449 dev->open_count = 0; in tower_release()
815 dev->open_count = 0; in tower_probe()
949 if (!dev->open_count) { in tower_disconnect()
/drivers/staging/goldfish/
Dgoldfish_audio.c114 static atomic_t open_count = ATOMIC_INIT(0); variable
205 if (atomic_inc_return(&open_count) == 1) { in goldfish_audio_open()
213 atomic_dec(&open_count); in goldfish_audio_open()
219 atomic_dec(&open_count); in goldfish_audio_release()
/drivers/gpu/drm/
Ddrm_file.c149 if (!dev->open_count++) in drm_open()
166 dev->open_count--; in drm_open()
380 DRM_DEBUG("open_count = %d\n", dev->open_count); in drm_release()
397 dev->open_count); in drm_release()
438 if (!--dev->open_count) { in drm_release()
Ddrm_drv.c388 if (dev->open_count == 0) in drm_dev_unplug()
/drivers/input/serio/
Dolpc_apsp.c77 int open_count; member
149 if (priv->open_count++ == 0) { in olpc_apsp_open()
163 if (--priv->open_count == 0) { in olpc_apsp_close()
/drivers/char/ipmi/
Dbt-bmc.c74 static atomic_t open_count = ATOMIC_INIT(0); variable
175 if (atomic_inc_return(&open_count) == 1) { in bt_bmc_open()
180 atomic_dec(&open_count); in bt_bmc_open()
342 atomic_dec(&open_count); in bt_bmc_release()
/drivers/input/touchscreen/
Dwacom_w8001.c101 int open_count; member
385 if (w8001->open_count++ == 0) { in w8001_open()
388 w8001->open_count--; in w8001_open()
401 if (--w8001->open_count == 0) in w8001_close()
/drivers/s390/block/
Ddasd_ioctl.c449 dasd_info->open_count = atomic_read(&block->open_count); in dasd_ioctl_information()
451 dasd_info->open_count++; in dasd_ioctl_information()
Ddasd.c158 atomic_set(&block->open_count, -1); in dasd_alloc_block()
3278 atomic_inc(&base->block->open_count); in dasd_open()
3317 atomic_dec(&base->block->open_count); in dasd_open()
3326 atomic_dec(&base->block->open_count); in dasd_release()
3610 int max_count, open_count, rc; in dasd_generic_set_offline() local
3629 open_count = atomic_read(&device->block->open_count); in dasd_generic_set_offline()
3630 if (open_count > max_count) { in dasd_generic_set_offline()
3631 if (open_count > 0) in dasd_generic_set_offline()
3633 dev_name(&cdev->dev), open_count); in dasd_generic_set_offline()
Ddasd_devmap.c800 atomic_inc(&device->block->open_count); in dasd_ro_store()
804 atomic_dec(&device->block->open_count); in dasd_ro_store()
/drivers/md/
Ddm-core.h54 atomic_t open_count; member
Ddm-thin-metadata.c217 int open_count; member
771 if (td->open_count) in __write_changed_details()
894 if (td->open_count) in dm_pool_metadata_close()
948 td2->open_count++; in __open_device()
978 (*td)->open_count = 1; in __open_device()
993 --td->open_count; in __close_device()
1154 if (td->open_count > 1) { in __delete_device()
Ddm.c317 atomic_inc(&md->open_count); in dm_blk_open()
334 if (atomic_dec_and_test(&md->open_count) && in dm_blk_close()
345 return atomic_read(&md->open_count); in dm_open_count()
1741 atomic_set(&md->open_count, 0); in alloc_dev()
/drivers/gpu/drm/nouveau/
Dnouveau_vga.c77 return dev->open_count == 0; in nouveau_switcheroo_can_switch()
/drivers/staging/media/lirc/
Dlirc_zilog.c107 atomic_t open_count; member
474 if (atomic_read(&ir->open_count) == 0) { in lirc_thread()
1322 atomic_inc(&ir->open_count); in open()
1343 atomic_dec(&ir->open_count); in close()
1481 atomic_set(&ir->open_count, 0); in ir_probe()
/drivers/char/
Dsonypi.c493 int open_count; member
895 sonypi_device.open_count--; in sonypi_misc_release()
904 if (!sonypi_device.open_count) in sonypi_misc_open()
906 sonypi_device.open_count++; in sonypi_misc_open()
/drivers/video/fbdev/nvidia/
Dnv_type.h150 u32 open_count; member
Dnvidia.c998 if (!par->open_count) { in nvidiafb_open()
1003 par->open_count++; in nvidiafb_open()
1012 if (!par->open_count) { in nvidiafb_release()
1017 if (par->open_count == 1) { in nvidiafb_release()
1022 par->open_count--; in nvidiafb_release()
/drivers/net/wan/
Dhdlc_fr.c124 int open_count; member
351 if (pvc->open_count++ == 0) { in pvc_open()
368 if (--pvc->open_count == 0) { in pvc_close()
531 if (pvc->open_count && !pvc->state.active && in fr_lmi_send()
/drivers/regulator/
Dcore.c1175 supply_rdev->open_count++; in set_supply()
1654 if (get_type == EXCLUSIVE_GET && rdev->open_count) { in _regulator_get()
1681 rdev->open_count++; in _regulator_get()
1787 rdev->open_count--; in _regulator_put()
2379 while (rdev->open_count--) in regulator_force_disable()
3494 if (rdev->bypass_count == rdev->open_count) { in regulator_allow_bypass()
3503 if (rdev->bypass_count != rdev->open_count) { in regulator_allow_bypass()
3949 &rdev->open_count); in rdev_init_debugfs()
4168 WARN_ON(rdev->open_count); in regulator_unregister()
4394 rdev->use_count, rdev->open_count, rdev->bypass_count); in regulator_summary_show_subtree()
/drivers/gpu/drm/i915/
Di915_vma.h67 unsigned int open_count; member
/drivers/video/fbdev/savage/
Dsavagefb.h200 u32 open_count; member
Dsavagefb_driver.c1610 if (!par->open_count) { in savagefb_open()
1619 par->open_count++; in savagefb_open()
1630 if (par->open_count == 1) { in savagefb_release()
1635 par->open_count--; in savagefb_release()

12