Home
last modified time | relevance | path

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

1234567

/linux-6.1.9/drivers/usb/misc/
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_async); in submit_async_request()
[all …]
/linux-6.1.9/drivers/crypto/virtio/
Dvirtio_crypto_mgr.c54 atomic_set(&vcrypto_dev->ref_count, 0); in virtcrypto_devmgr_add_dev()
117 return atomic_read(&vcrypto_dev->ref_count) != 0; in virtcrypto_dev_in_use()
133 if (atomic_add_return(1, &vcrypto_dev->ref_count) == 1) in virtcrypto_dev_get()
152 if (atomic_sub_return(1, &vcrypto_dev->ref_count) == 0) in virtcrypto_dev_put()
198 ctr = atomic_read(&tmp_dev->ref_count); in virtcrypto_get_dev_node()
/linux-6.1.9/drivers/block/
Dswim.c187 int ref_count; member
617 if (fs->ref_count == -1 || (fs->ref_count && mode & FMODE_EXCL)) in floppy_open()
621 fs->ref_count = -1; in floppy_open()
623 fs->ref_count++; in floppy_open()
652 if (fs->ref_count < 0) in floppy_open()
653 fs->ref_count = 0; in floppy_open()
654 else if (fs->ref_count > 0) in floppy_open()
655 --fs->ref_count; in floppy_open()
657 if (fs->ref_count == 0) in floppy_open()
679 if (fs->ref_count < 0) in floppy_release()
[all …]
Dswim3.c195 int ref_count; member
901 if (fs->ref_count != 1) in floppy_locked_ioctl()
932 if (fs->ref_count == 0) { in floppy_open()
961 } else if (fs->ref_count == -1 || mode & FMODE_EXCL) in floppy_open()
980 if (fs->ref_count == 0) { in floppy_open()
989 fs->ref_count = -1; in floppy_open()
991 ++fs->ref_count; in floppy_open()
1013 if (fs->ref_count > 0) in floppy_release()
1014 --fs->ref_count; in floppy_release()
1015 else if (fs->ref_count == -1) in floppy_release()
[all …]
/linux-6.1.9/drivers/soc/ti/
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, 0); in pktdma_init_chan()
[all …]
/linux-6.1.9/drivers/net/ethernet/marvell/prestera/
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-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/lib/
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-6.1.9/drivers/gpu/drm/amd/display/dc/
Ddc_trace.h41 #define TRACE_DCN_FPU(begin, function, line, ref_count) \ argument
42 trace_dcn_fpu(begin, function, line, ref_count)
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/
Duar.c84 struct mlx5_uars_page *up = container_of(kref, struct mlx5_uars_page, ref_count); in up_rel_func()
150 kref_init(&up->ref_count); in alloc_uars_page()
173 kref_get(&ret->ref_count); in mlx5_get_uars_page()
190 kref_put(&up->ref_count, up_rel_func); in mlx5_put_uars_page()
234 kref_get(&up->ref_count); in alloc_bfreg()
325 kref_put(&up->ref_count, up_rel_func); in mlx5_free_bfreg()
Deswitch_offloads_termtbl.c17 int ref_count; member
153 tt->ref_count++; in mlx5_eswitch_termtbl_get_create()
167 if (--tt->ref_count == 0) in mlx5_eswitch_termtbl_put()
171 if (!tt->ref_count) { in mlx5_eswitch_termtbl_put()
/linux-6.1.9/sound/virtio/
Dvirtio_ctl_msg.c24 refcount_t ref_count; member
35 refcount_inc(&msg->ref_count); in virtsnd_ctl_msg_ref()
48 if (refcount_dec_and_test(&msg->ref_count)) in virtsnd_ctl_msg_unref()
104 refcount_set(&msg->ref_count, 1); in virtsnd_ctl_msg_alloc()
/linux-6.1.9/drivers/acpi/
Dpower.c53 unsigned int ref_count; member
399 if (resource->ref_count++) { in acpi_power_on_unlocked()
405 resource->ref_count--; in acpi_power_on_unlocked()
442 if (!resource->ref_count) { in acpi_power_off_unlocked()
448 if (--resource->ref_count) { in acpi_power_off_unlocked()
454 resource->ref_count++; in acpi_power_off_unlocked()
625 if (!resource->ref_count && in acpi_power_wakeup_list_init()
901 return sprintf(buf, "%u\n", !!resource->ref_count); in resource_in_use_show()
1013 && resource->ref_count) { in acpi_resume_power_resources()
1037 if (!resource->ref_count && in acpi_turn_off_unused_power_resources()
/linux-6.1.9/drivers/net/ethernet/netronome/nfp/flower/
Dtunnel_conf.c131 int ref_count; member
184 int ref_count; member
777 entry->ref_count++; in nfp_tunnel_add_ipv4_off()
790 entry->ref_count = 1; in nfp_tunnel_add_ipv4_off()
807 entry->ref_count--; in nfp_tunnel_del_ipv4_off()
808 if (!entry->ref_count) { in nfp_tunnel_del_ipv4_off()
853 entry->ref_count++; in nfp_tunnel_add_ipv6_off()
865 entry->ref_count = 1; in nfp_tunnel_add_ipv6_off()
881 if (!--entry->ref_count) { in nfp_tunnel_put_ipv6_off()
970 entry->ref_count++; in nfp_tunnel_offloaded_macs_inc_ref_and_link()
[all …]
/linux-6.1.9/sound/hda/ext/
Dhdac_ext_controller.c101 hlink->ref_count = 1; in snd_hdac_ext_bus_get_ml_capabilities()
272 if (++link->ref_count == 1) { in snd_hdac_ext_bus_link_get()
315 if (--link->ref_count == 0) { in snd_hdac_ext_bus_link_put()
323 if (hlink->ref_count) { in snd_hdac_ext_bus_link_put()
/linux-6.1.9/drivers/irqchip/
Dirq-pruss-intc.c80 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-6.1.9/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_span.c39 refcount_t ref_count; member
48 refcount_t ref_count; member
860 if (!refcount_read(&mlxsw_sp->span->entries[i].ref_count)) { in mlxsw_sp_span_entry_create()
879 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
904 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev) in mlxsw_sp_span_entry_find_by_port()
925 if (refcount_read(&curr->ref_count) && curr->id == span_id) in mlxsw_sp_span_entry_find_by_id()
941 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev && in mlxsw_sp_span_entry_find_by_parms()
962 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get()
972 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put()
1042 if (!refcount_read(&curr->ref_count)) in mlxsw_sp_span_respin_work()
[all …]
Dcore_acl_flex_actions.c98 unsigned int ref_count; member
123 unsigned int ref_count; member
135 refcount_t ref_count; member
185 refcount_t ref_count; member
285 set->ref_count = 1; in mlxsw_afa_set_create()
333 if (--set->ref_count) in mlxsw_afa_set_put()
353 set->ref_count++; in mlxsw_afa_set_get()
567 fwd_entry->ref_count = 1; in mlxsw_afa_fwd_entry_create()
610 fwd_entry->ref_count++; in mlxsw_afa_fwd_entry_get()
619 if (--fwd_entry->ref_count) in mlxsw_afa_fwd_entry_put()
[all …]
/linux-6.1.9/drivers/firewire/
Dcore.h186 refcount_t ref_count; member
199 refcount_inc(&node->ref_count); in fw_node_get()
206 if (refcount_dec_and_test(&node->ref_count)) in fw_node_put()
/linux-6.1.9/drivers/s390/char/
Draw3270.h154 atomic_t ref_count; member
179 atomic_inc(&view->ref_count); in raw3270_get_view()
187 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
/linux-6.1.9/drivers/crypto/qat/qat_common/
Dadf_dev_mgr.c152 atomic_set(&accel_dev->ref_count, 0); in adf_devmgr_add_dev()
382 return atomic_read(&accel_dev->ref_count) != 0; in adf_dev_in_use()
399 if (atomic_add_return(1, &accel_dev->ref_count) == 1) in adf_dev_get()
419 if (atomic_sub_return(1, &accel_dev->ref_count) == 0) in adf_dev_put()
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx4/
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, 0); in alloc_srq_tr()
[all …]
/linux-6.1.9/fs/cifs/
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-6.1.9/drivers/gpu/drm/lima/
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()
/linux-6.1.9/arch/s390/mm/
Dextmem.c68 refcount_t ref_count; member
366 refcount_set(&seg->ref_count, 1); in __segment_load()
426 refcount_inc(&seg->ref_count); in segment_load()
472 if (refcount_read(&seg->ref_count) != 1) { in segment_modify_shared()
548 if (!refcount_dec_and_test(&seg->ref_count)) in segment_unload()
/linux-6.1.9/drivers/gpu/drm/vmwgfx/
Dvmwgfx_page_dirty.c68 unsigned int ref_count; member
238 dirty->ref_count++; in vmw_bo_dirty_add()
252 dirty->ref_count = 1; in vmw_bo_dirty_add()
291 if (dirty && --dirty->ref_count == 0) { in vmw_bo_dirty_release()

1234567