Home
last modified time | relevance | path

Searched refs:ref_count (Results 1 – 25 of 160) sorted by relevance

1234567

/linux/drivers/usb/misc/
H A Duss720.c50 struct kref ref_count; member
58 struct kref ref_count; member
70 struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count); in destroy_priv()
80 struct uss720_async_request *rq = container_of(kref, struct uss720_async_request, ref_count); in destroy_async()
91 kref_put(&priv->ref_count, destroy_priv); in destroy_async()
120 kref_put(&rq->ref_count, destroy_async); in async_complete()
140 kref_init(&rq->ref_count); in submit_async_request()
143 kref_get(&priv->ref_count); in submit_async_request()
147 kref_put(&rq->ref_count, destroy_async); in submit_async_request()
152 kref_put(&rq->ref_count, destroy_asyn in submit_async_request()
[all...]
/linux/drivers/block/
H A Dswim.c187 int ref_count; member
617 if (fs->ref_count == -1 || (fs->ref_count && mode & BLK_OPEN_EXCL)) in floppy_open()
620 fs->ref_count = -1; in floppy_open()
622 fs->ref_count++; in floppy_open()
650 if (fs->ref_count < 0) in floppy_open()
651 fs->ref_count = 0; in floppy_open()
652 else if (fs->ref_count > 0) in floppy_open()
653 --fs->ref_count; in floppy_open()
655 if (fs->ref_count in floppy_open()
[all...]
/linux/drivers/gpu/drm/imagination/
H A Dpvr_context.h33 /** @ref_count: Refcount for context. */
34 struct kref ref_count; member
124 kref_get(&ctx->ref_count); in pvr_context_get()
144 return ctx != NULL && kref_get_unless_zero(&ctx->ref_count) != 0; in pvr_context_get_if_referenced()
191 * meaning the ref_count reached zero before they get removed. We need in pvr_context_lookup_id()
196 if (!kref_get_unless_zero(&ctx->ref_count)) in pvr_context_lookup_id()
H A Dpvr_hwrt.h58 /** @ref_count: Reference count of object. */
59 struct kref ref_count; member
108 kref_get(&hwrt->ref_count); in pvr_hwrt_dataset_lookup()
161 kref_get(&hwrt->hwrt_dataset->ref_count); in pvr_hwrt_data_get()
H A Dpvr_free_list.h48 /** @ref_count: Reference count of object. */
49 struct kref ref_count; member
120 kref_get(&free_list->ref_count); in pvr_free_list_get()
168 * meaning the ref_count reached zero before they get removed. We need in pvr_free_list_lookup_id()
173 if (free_list && !kref_get_unless_zero(&free_list->ref_count)) in pvr_free_list_lookup_id()
H A Dpvr_job.h34 /** @ref_count: Refcount for job. */
35 struct kref ref_count; member
107 kref_get(&job->ref_count); in pvr_job_get()
H A Dpvr_context.c303 kref_init(&ctx->ref_count); in pvr_context_create()
373 pvr_context_release(struct kref *ref_count) in pvr_context_release() argument
376 container_of(ref_count, struct pvr_context, ref_count); in pvr_context_release()
400 kref_put(&ctx->ref_count, pvr_context_release); in pvr_context_put()
/linux/drivers/crypto/virtio/
H A Dvirtio_crypto_mgr.c54 atomic_set(&vcrypto_dev->ref_count, 0); in virtcrypto_devmgr_add_dev()
97 if (atomic_add_return(1, &vcrypto_dev->ref_count) == 1) in virtcrypto_dev_get()
116 if (atomic_sub_return(1, &vcrypto_dev->ref_count) == 0) in virtcrypto_dev_put()
162 ctr = atomic_read(&tmp_dev->ref_count); in virtcrypto_get_dev_node()
/linux/drivers/soc/ti/
H A Dknav_dma.c101 atomic_t ref_count; member
110 atomic_t ref_count; member
345 if (atomic_read(&chan->ref_count)) in dma_debug_show_devices()
355 if (atomic_read(&dma->ref_count)) { in knav_dma_debug_show()
469 if (atomic_read(&chan->ref_count) >= 1) { in knav_dma_open_channel()
477 if (atomic_inc_return(&chan->dma->ref_count) <= 1) in knav_dma_open_channel()
480 if (atomic_inc_return(&chan->ref_count) <= 1) in knav_dma_open_channel()
505 if (atomic_dec_return(&chan->ref_count) <= 0) in knav_dma_close_channel()
508 if (atomic_dec_return(&chan->dma->ref_count) <= 0) in knav_dma_close_channel()
582 atomic_set(&chan->ref_count, in pktdma_init_chan()
[all...]
/linux/drivers/net/ethernet/marvell/prestera/
H A Dprestera_span.c16 refcount_t ref_count; member
34 refcount_set(&entry->ref_count, 1); in prestera_span_entry_create()
84 refcount_inc(&entry->ref_count); in prestera_span_get()
112 if (!refcount_dec_and_test(&entry->ref_count)) in prestera_span_put()
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
H A Dmpfs.c69 int ref_count; member
147 l2addr->ref_count++; in mlx5_mpfs_add_mac()
166 l2addr->ref_count = 1; in mlx5_mpfs_add_mac()
199 if (--l2addr->ref_count > 0) in mlx5_mpfs_del_mac()
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Duar.c83 struct mlx5_uars_page *up = container_of(kref, struct mlx5_uars_page, ref_count); in up_rel_func()
149 kref_init(&up->ref_count); in alloc_uars_page()
172 kref_get(&ret->ref_count); in mlx5_get_uars_page()
189 kref_put(&up->ref_count, up_rel_func); in mlx5_put_uars_page()
233 kref_get(&up->ref_count); in alloc_bfreg()
324 kref_put(&up->ref_count, up_rel_func); in mlx5_free_bfreg()
/linux/drivers/gpu/drm/amd/display/dc/
H A Ddc_trace.h41 #define TRACE_DCN_FPU(begin, function, line, ref_count) \ argument
42 trace_dcn_fpu(begin, function, line, ref_count)
/linux/drivers/s390/char/
H A Draw3270.h78 atomic_t ref_count; member
106 atomic_inc(&view->ref_count); in raw3270_get_view()
114 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
/linux/sound/virtio/
H A Dvirtio_ctl_msg.c17 * @ref_count: Reference count used to manage a message lifetime.
24 refcount_t ref_count; member
35 refcount_inc(&msg->ref_count); in virtsnd_ctl_msg_ref()
42 * The message will be freed when the ref_count value is 0.
48 if (refcount_dec_and_test(&msg->ref_count)) in virtsnd_ctl_msg_unref()
80 * The message will be automatically freed when the ref_count value is 0.
104 refcount_set(&msg->ref_count, 1); in virtsnd_ctl_msg_alloc()
/linux/drivers/acpi/
H A Dpower.c55 unsigned int ref_count; member
401 if (resource->ref_count++) { in acpi_power_on_unlocked()
407 resource->ref_count--; in acpi_power_on_unlocked()
444 if (!resource->ref_count) { in acpi_power_off_unlocked()
450 if (--resource->ref_count) { in acpi_power_off_unlocked()
456 resource->ref_count++; in acpi_power_off_unlocked()
627 if (!resource->ref_count && in acpi_power_wakeup_list_init()
903 return sprintf(buf, "%u\n", !!resource->ref_count); in resource_in_use_show()
1015 && resource->ref_count) { in acpi_resume_power_resources()
1057 if (!resource->ref_count in acpi_turn_off_unused_power_resources()
[all...]
/linux/drivers/irqchip/
H A Dirq-pruss-intc.c76 * @ref_count: Keeps track of number of current users of this resource
80 u8 ref_count; member
186 intc->event_channel[hwirq].ref_count++; in pruss_intc_map()
200 if (++intc->channel_host[ch].ref_count == 1) { in pruss_intc_map()
232 if (--intc->channel_host[ch].ref_count == 0) { in pruss_intc_unmap()
240 intc->event_channel[hwirq].ref_count--; in pruss_intc_unmap()
384 if (intc->event_channel[event].ref_count > 0 && in pruss_intc_validate_mapping()
393 if (intc->channel_host[channel].ref_count > 0 && in pruss_intc_validate_mapping()
/linux/sound/hda/core/ext/
H A Dcontroller.c109 hlink->ref_count = 1; in snd_hdac_ext_bus_get_ml_capabilities()
309 if (++hlink->ref_count == 1) { in snd_hdac_ext_bus_link_get()
352 if (--hlink->ref_count == 0) { in snd_hdac_ext_bus_link_put()
360 if (hlink_tmp->ref_count) { in snd_hdac_ext_bus_link_put()
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_span.c39 refcount_t ref_count; member
48 refcount_t ref_count; member
861 if (!refcount_read(&mlxsw_sp->span->entries[i].ref_count)) { in mlxsw_sp_span_entry_create()
880 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
905 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev) in mlxsw_sp_span_entry_find_by_port()
926 if (refcount_read(&curr->ref_count) && curr->id == span_id) in mlxsw_sp_span_entry_find_by_id()
942 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev && in mlxsw_sp_span_entry_find_by_parms()
963 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get()
973 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put()
1043 if (!refcount_read(&curr->ref_count)) in mlxsw_sp_span_respin_work()
[all...]
/linux/drivers/crypto/intel/qat/qat_common/
H A Dadf_dev_mgr.c152 atomic_set(&accel_dev->ref_count, 0); in adf_devmgr_add_dev()
374 return atomic_read(&accel_dev->ref_count) != 0; in adf_dev_in_use()
391 if (atomic_add_return(1, &accel_dev->ref_count) == 1) in adf_dev_get()
411 if (atomic_sub_return(1, &accel_dev->ref_count) == 0) in adf_dev_put()
/linux/drivers/net/ethernet/mellanox/mlx4/
H A Dresource_tracker.c58 int ref_count; member
66 int ref_count; member
117 atomic_t ref_count; member
146 atomic_t ref_count; member
182 atomic_t ref_count; member
195 atomic_t ref_count; member
1063 atomic_set(&ret->ref_count, 0); in alloc_qp_tr()
1079 atomic_set(&ret->ref_count, 0); in alloc_mtt_tr()
1123 atomic_set(&ret->ref_count, 0); in alloc_cq_tr()
1138 atomic_set(&ret->ref_count, in alloc_srq_tr()
[all...]
/linux/fs/smb/client/
H A Dcifs_swn.c24 struct kref ref_count; member
315 kref_get(&reg->ref_count); in cifs_get_swn_reg()
329 kref_init(&reg->ref_count); in cifs_get_swn_reg()
374 struct cifs_swn_reg *swnreg = container_of(ref, struct cifs_swn_reg, ref_count); in cifs_swn_reg_release()
390 kref_put(&swnreg->ref_count, cifs_swn_reg_release); in cifs_put_swn_reg()
638 id, kref_read(&swnreg->ref_count), in cifs_swn_dump()
/linux/arch/s390/kvm/
H A Dgmap-vsie.c48 refcount_inc(&sg->ref_count); in gmap_find_shadow()
117 refcount_set(&new->ref_count, 2); in gmap_shadow()
/linux/drivers/md/dm-vdo/indexer/
H A Dio-factory.c26 atomic_t ref_count; member
59 atomic_inc(&factory->ref_count); in uds_get_io_factory()
72 atomic_set_release(&factory->ref_count, 1); in uds_make_io_factory()
87 if (atomic_add_return(-1, &factory->ref_count) <= 0) in uds_put_io_factory()
/linux/drivers/gpu/drm/lima/
H A Dlima_vm.c14 unsigned int ref_count; member
101 bo_va->ref_count++; in lima_vm_bo_add()
119 bo_va->ref_count = 1; in lima_vm_bo_add()
163 if (--bo_va->ref_count > 0) { in lima_vm_bo_del()

1234567