diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 12:49:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 12:49:28 -0700 |
commit | 1f3a8e093f470ef193b0ca6011d90180331c8b53 (patch) | |
tree | 66b7a58decabdc7f76ffb102899881c258c1df59 /drivers/staging/iio/kfifo_buf.h | |
parent | c44dead70a841d90ddc01968012f323c33217c9e (diff) | |
parent | 1a4b6f66285785ddccef049e6b45be4e7c7a2189 (diff) |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits)
staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_
staging:iio: Trivial kconfig reorganization and uniformity improvements.
staging:iio:documenation partial update.
staging:iio: use pollfunc allocation helpers in remaining drivers.
staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out.
staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev.
staging:iio:meter:ade7758: Use private data space from iio_allocate_device
staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value.
staging:iio: ring core cleanups + check if read_last available in lis3l02dq
staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name.
staging:iio: poll func allocation clean up.
staging:iio:ad7780 trivial unused header cleanup.
staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes
staging:iio:adc:AD7780: Convert to new channel registration method
staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv()
staging:iio:adc: AD7606: Consitently use indio_dev
staging:iio: Rip out helper for software rings.
staging:iio:adc:AD7298: Use private data space from iio_allocate_device
staging:iio: rationalization of different buffer implementation hooks.
staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev.
...
Fix up trivial conflicts in
- drivers/staging/intel_sst/intelmid.c: patches applied in both branches
- drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling
- drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
Diffstat (limited to 'drivers/staging/iio/kfifo_buf.h')
-rw-r--r-- | drivers/staging/iio/kfifo_buf.h | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/staging/iio/kfifo_buf.h b/drivers/staging/iio/kfifo_buf.h index 8064383bf7c3..aac30539b2c6 100644 --- a/drivers/staging/iio/kfifo_buf.h +++ b/drivers/staging/iio/kfifo_buf.h @@ -11,45 +11,7 @@ struct iio_kfifo { struct mutex use_lock; }; -#define iio_to_kfifo(r) container_of(r, struct iio_kfifo, ring) - -int iio_create_kfifo(struct iio_ring_buffer **r); -int iio_init_kfifo(struct iio_ring_buffer *r, struct iio_dev *indio_dev); -void iio_exit_kfifo(struct iio_ring_buffer *r); -void iio_free_kfifo(struct iio_ring_buffer *r); -void iio_mark_kfifo_in_use(struct iio_ring_buffer *r); -void iio_unmark_kfifo_in_use(struct iio_ring_buffer *r); - -int iio_store_to_kfifo(struct iio_ring_buffer *r, u8 *data, s64 timestamp); -int iio_rip_kfifo(struct iio_ring_buffer *r, - size_t count, - char __user *buf, - int *dead_offset); - -int iio_request_update_kfifo(struct iio_ring_buffer *r); -int iio_mark_update_needed_kfifo(struct iio_ring_buffer *r); - -int iio_get_bytes_per_datum_kfifo(struct iio_ring_buffer *r); -int iio_set_bytes_per_datum_kfifo(struct iio_ring_buffer *r, size_t bpd); -int iio_get_length_kfifo(struct iio_ring_buffer *r); -int iio_set_length_kfifo(struct iio_ring_buffer *r, int length); - -static inline void iio_kfifo_register_funcs(struct iio_ring_access_funcs *ra) -{ - ra->mark_in_use = &iio_mark_kfifo_in_use; - ra->unmark_in_use = &iio_unmark_kfifo_in_use; - - ra->store_to = &iio_store_to_kfifo; - ra->rip_lots = &iio_rip_kfifo; - - ra->mark_param_change = &iio_mark_update_needed_kfifo; - ra->request_update = &iio_request_update_kfifo; - - ra->get_bytes_per_datum = &iio_get_bytes_per_datum_kfifo; - ra->set_bytes_per_datum = &iio_set_bytes_per_datum_kfifo; - ra->get_length = &iio_get_length_kfifo; - ra->set_length = &iio_set_length_kfifo; -}; +extern const struct iio_ring_access_funcs kfifo_access_funcs; struct iio_ring_buffer *iio_kfifo_allocate(struct iio_dev *indio_dev); void iio_kfifo_free(struct iio_ring_buffer *r); |