Home
last modified time | relevance | path

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

1234567

/linux/drivers/usb/misc/
A Duss720.c50 struct kref ref_count; member
58 struct kref ref_count; member
90 kref_put(&priv->ref_count, destroy_priv); in destroy_async()
119 kref_put(&rq->ref_count, destroy_async); in async_complete()
139 kref_init(&rq->ref_count); in submit_async_request()
142 kref_get(&priv->ref_count); in submit_async_request()
146 kref_put(&rq->ref_count, destroy_async); in submit_async_request()
166 kref_get(&rq->ref_count); in submit_async_request()
170 destroy_async(&rq->ref_count); in submit_async_request()
242 kref_put(&rq->ref_count, destroy_async); in set_1284_register()
[all …]
/linux/drivers/block/
A 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()
655 --fs->ref_count; in floppy_open()
679 if (fs->ref_count < 0) in floppy_release()
680 fs->ref_count = 0; in floppy_release()
682 --fs->ref_count; in floppy_release()
[all …]
A 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()
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()
1016 fs->ref_count = 0; in floppy_release()
[all …]
/linux/drivers/crypto/virtio/
A 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/drivers/soc/ti/
A Dknav_dma.c109 atomic_t ref_count; member
118 atomic_t ref_count; member
353 if (atomic_read(&chan->ref_count)) in dma_debug_show_devices()
363 if (atomic_read(&dma->ref_count)) { in knav_dma_debug_show()
479 if (atomic_read(&chan->ref_count) >= 1) { in knav_dma_open_channel()
490 if (atomic_inc_return(&chan->ref_count) <= 1) in knav_dma_open_channel()
515 if (atomic_dec_return(&chan->ref_count) <= 0) in knav_dma_close_channel()
592 atomic_set(&chan->ref_count, 0); in pktdma_init_chan()
693 atomic_set(&dma->ref_count, 0); in dma_init()
714 atomic_inc(&dma->ref_count); in dma_init()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/
A Duar.c85 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()
A Deswitch_offloads_termtbl.c17 int ref_count; member
151 tt->ref_count++; in mlx5_eswitch_termtbl_get_create()
165 if (--tt->ref_count == 0) in mlx5_eswitch_termtbl_put()
169 if (!tt->ref_count) { in mlx5_eswitch_termtbl_put()
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/
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/marvell/prestera/
A Dprestera_span.c15 refcount_t ref_count; member
33 refcount_set(&entry->ref_count, 1); in prestera_span_entry_create()
83 refcount_inc(&entry->ref_count); in prestera_span_get()
111 if (!refcount_dec_and_test(&entry->ref_count)) in prestera_span_put()
/linux/drivers/net/ethernet/netronome/nfp/flower/
A Dtunnel_conf.c163 int ref_count; member
216 int ref_count; member
724 entry->ref_count++; in nfp_tunnel_add_ipv4_off()
737 entry->ref_count = 1; in nfp_tunnel_add_ipv4_off()
754 entry->ref_count--; in nfp_tunnel_del_ipv4_off()
800 entry->ref_count++; in nfp_tunnel_add_ipv6_off()
812 entry->ref_count = 1; in nfp_tunnel_add_ipv6_off()
917 entry->ref_count++; in nfp_tunnel_offloaded_macs_inc_ref_and_link()
984 if (!entry->ref_count) in nfp_tunnel_add_shared_mac()
1020 entry->ref_count--; in nfp_tunnel_del_shared_mac()
[all …]
/linux/sound/virtio/
A 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/drivers/acpi/
A 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()
889 return sprintf(buf, "%u\n", !!resource->ref_count); in resource_in_use_show()
997 && resource->ref_count) { in acpi_resume_power_resources()
1021 if (!resource->ref_count && in acpi_turn_off_unused_power_resources()
/linux/drivers/gpu/drm/amd/display/dc/
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/irqchip/
A 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/sound/hda/ext/
A Dhdac_ext_controller.c108 hlink->ref_count = 1; in snd_hdac_ext_bus_get_ml_capabilities()
268 if (++link->ref_count == 1) { in snd_hdac_ext_bus_link_get()
311 if (--link->ref_count == 0) { in snd_hdac_ext_bus_link_put()
319 if (hlink->ref_count) { in snd_hdac_ext_bus_link_put()
/linux/drivers/net/ethernet/mellanox/mlxsw/
A Dspectrum_span.c39 refcount_t ref_count; member
48 refcount_t ref_count; member
879 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
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()
1126 refcount_set(&analyzed_port->ref_count, 1); in mlxsw_sp_span_analyzed_port_create()
1176 refcount_inc(&analyzed_port->ref_count); in mlxsw_sp_span_analyzed_port_get()
1205 if (!refcount_dec_and_test(&analyzed_port->ref_count)) in mlxsw_sp_span_analyzed_port_put()
1511 refcount_set(&trigger_entry->ref_count, 1); in mlxsw_sp_span_trigger_entry_create()
[all …]
A 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/drivers/net/ethernet/mellanox/mlx4/
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
2034 ++res->ref_count; in mac_add_to_slave()
2049 res->ref_count = 1; in mac_add_to_slave()
2066 if (!--res->ref_count) { in mac_del_from_slave()
2141 ++res->ref_count; in vlan_add_to_slave()
[all …]
/linux/drivers/firewire/
A 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/drivers/scsi/mpi3mr/
A Dmpi3mr.h453 struct kref ref_count; member
464 kref_get(&s->ref_count); in mpi3mr_tgtdev_get()
475 kfree(container_of(r, struct mpi3mr_tgt_dev, ref_count)); in mpi3mr_free_tgtdev()
486 kref_put(&s->ref_count, mpi3mr_free_tgtdev); in mpi3mr_tgtdev_put()
852 struct kref ref_count; member
/linux/drivers/crypto/qat/qat_common/
A 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/drivers/s390/char/
A Draw3270.h154 atomic_t ref_count; member
178 atomic_inc(&view->ref_count); in raw3270_get_view()
186 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
/linux/drivers/gpu/drm/lima/
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()
/linux/fs/cifs/
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()
641 id, kref_read(&swnreg->ref_count), in cifs_swn_dump()
/linux/arch/s390/mm/
A 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()

Completed in 2008 milliseconds

1234567