Home
last modified time | relevance | path

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

12

/drivers/usb/misc/
Dadutux.c77 int open_count; /* number of times this port has been opened */ member
255 if (dev->open_count) { in adu_open()
260 ++dev->open_count; in adu_open()
262 dev->open_count); in adu_open()
298 --dev->open_count; in adu_release_internal()
300 dev->open_count); in adu_release_internal()
301 if (dev->open_count <= 0) { in adu_release_internal()
303 dev->open_count = 0; in adu_release_internal()
325 if (dev->open_count <= 0) { in adu_release()
334 if (!dev->open_count) /* ... and we're the last user */ in adu_release()
[all …]
Dldusb.c157 int open_count; /* number of times this port has been opened */ member
327 if (dev->open_count) { in ld_usb_open()
331 dev->open_count = 1; in ld_usb_open()
354 dev->open_count = 0; in ld_usb_open()
384 if (dev->open_count != 1) { in ld_usb_release()
400 dev->open_count = 0; in ld_usb_release()
773 if (!dev->open_count) { in ld_usb_disconnect()
Dlegousbtower.c192 int open_count; /* number of times this port has been opened */ member
338 if (dev->open_count) { in tower_open()
382 dev->open_count = 1; in tower_open()
426 dev->open_count = 0; in tower_release()
860 if (!dev->open_count) { in tower_disconnect()
/drivers/fpga/
Ddfl.h327 int open_count; member
341 if (pdata->open_count) in dfl_feature_dev_use_begin()
346 pdata->open_count++; in dfl_feature_dev_use_begin()
356 if (WARN_ON(pdata->open_count <= 0)) in dfl_feature_dev_use_end()
359 pdata->open_count--; in dfl_feature_dev_use_end()
365 return pdata->open_count; in dfl_feature_dev_use_count()
/drivers/vfio/
Dvfio_main.c134 unsigned int open_count = 0; in vfio_device_set_open_count() local
139 open_count += cur->open_count; in vfio_device_set_open_count()
140 return open_count; in vfio_device_set_open_count()
441 return !WARN_ON_ONCE(!READ_ONCE(device->open_count)); in vfio_assert_device_open()
521 if (device->open_count != 0 && !df->group) in vfio_df_open()
524 device->open_count++; in vfio_df_open()
525 if (device->open_count == 1) { in vfio_df_open()
528 device->open_count--; in vfio_df_open()
541 if (device->open_count == 1) in vfio_df_close()
543 device->open_count--; in vfio_df_close()
Dgroup.c186 if (device->open_count == 0) in vfio_df_group_open()
190 if (df->iommufd && vfio_device_is_noiommu(device) && device->open_count == 0) { in vfio_df_group_open()
208 if (df->iommufd && device->open_count == 1) { in vfio_df_group_open()
228 if (device->open_count == 0) in vfio_df_group_open()
246 if (device->open_count == 0) in vfio_df_group_close()
/drivers/input/serio/
Dolpc_apsp.c68 int open_count; member
141 if (priv->open_count++ == 0) { in olpc_apsp_open()
161 if (--priv->open_count == 0) { in olpc_apsp_close()
/drivers/char/ipmi/
Dbt-bmc.c67 static atomic_t open_count = ATOMIC_INIT(0); variable
153 if (atomic_inc_return(&open_count) == 1) { in bt_bmc_open()
158 atomic_dec(&open_count); in bt_bmc_open()
314 atomic_dec(&open_count); in bt_bmc_release()
/drivers/gpu/drm/
Ddrm_file.c255 atomic_read(&dev->open_count)); in drm_file_free()
424 if (!atomic_fetch_inc(&dev->open_count)) in drm_open()
447 atomic_dec(&dev->open_count); in drm_open()
492 drm_dbg_core(dev, "open_count = %d\n", atomic_read(&dev->open_count)); in drm_release()
496 if (atomic_dec_and_test(&dev->open_count)) in drm_release()
563 if (atomic_dec_and_mutex_lock(&dev->open_count, &drm_global_mutex)) { in drm_release_noglobal()
/drivers/accel/
Ddrm_accel.c239 atomic_fetch_inc(&dev->open_count); in accel_open()
251 atomic_dec(&dev->open_count); in accel_open()
/drivers/input/touchscreen/
Dwacom_w8001.c103 int open_count; member
387 if (w8001->open_count++ == 0) { in w8001_open()
390 w8001->open_count--; in w8001_open()
403 if (--w8001->open_count == 0) in w8001_close()
/drivers/video/fbdev/core/
Dfb_defio.c307 fbdefio->open_count++; in fb_deferred_io_open()
329 if (!--fbdefio->open_count) in fb_deferred_io_release()
/drivers/gpu/drm/i915/
Di915_switcheroo.c51 return i915 && HAS_DISPLAY(i915) && atomic_read(&i915->drm.open_count) == 0; in i915_switcheroo_can_switch()
Di915_vma_types.h213 atomic_t open_count; member
/drivers/s390/block/
Ddasd_ioctl.c539 dasd_info->open_count = atomic_read(&block->open_count); in __dasd_ioctl_information()
541 dasd_info->open_count++; in __dasd_ioctl_information()
Ddasd.c158 atomic_set(&block->open_count, -1); in dasd_alloc_block()
3270 atomic_inc(&base->block->open_count); in dasd_open()
3307 atomic_dec(&base->block->open_count); in dasd_open()
3316 atomic_dec(&base->block->open_count); in dasd_release()
3578 int max_count, open_count, rc; in dasd_generic_set_offline() local
3602 open_count = atomic_read(&device->block->open_count); in dasd_generic_set_offline()
3603 if (open_count > max_count) { in dasd_generic_set_offline()
3604 if (open_count > 0) in dasd_generic_set_offline()
3606 open_count); in dasd_generic_set_offline()
/drivers/gpu/drm/nouveau/
Dnouveau_vga.c73 return atomic_read(&dev->open_count) == 0; in nouveau_switcheroo_can_switch()
/drivers/md/
Ddm-thin-metadata.c236 int open_count; member
873 if (td->open_count) in __write_changed_details()
1002 if (td->open_count) in dm_pool_metadata_close()
1056 td2->open_count++; in __open_device()
1086 (*td)->open_count = 1; in __open_device()
1101 --td->open_count; in __close_device()
1260 if (td->open_count > 1) { in __delete_device()
Ddm-core.h72 atomic_t open_count; member
/drivers/char/
Dsonypi.c479 int open_count; member
881 sonypi_device.open_count--; in sonypi_misc_release()
890 if (!sonypi_device.open_count) in sonypi_misc_open()
892 sonypi_device.open_count++; in sonypi_misc_open()
/drivers/video/fbdev/nvidia/
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()
Dnv_type.h150 u32 open_count; member
/drivers/net/wan/
Dhdlc_fr.c118 int open_count; member
330 if (pvc->open_count++ == 0) { in pvc_open()
346 if (--pvc->open_count == 0) { in pvc_close()
515 if (pvc->open_count && !pvc->state.active && in fr_lmi_send()
/drivers/regulator/
Dcore.c1718 supply_rdev->open_count++; in set_supply()
2233 if (get_type == EXCLUSIVE_GET && rdev->open_count) { in _regulator_get()
2272 rdev->open_count++; in _regulator_get()
2382 rdev->open_count--; in destroy_regulator()
4792 if (rdev->bypass_count == rdev->open_count) { in regulator_allow_bypass()
4805 if (rdev->bypass_count != rdev->open_count) { in regulator_allow_bypass()
5273 &rdev->open_count); in rdev_init_debugfs()
5770 WARN_ON(rdev->open_count); in regulator_unregister()
5988 rdev->use_count, rdev->open_count, rdev->bypass_count, in regulator_summary_show_subtree()
/drivers/video/fbdev/savage/
Dsavagefb.h199 u32 open_count; member

12