Commit 62eeae93 authored by Shane Warden's avatar Shane Warden Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: comedidev.h: Fixed checkpatch.pl issues

parent f3662436
Loading
Loading
Loading
Loading
+34 −26
Original line number Diff line number Diff line
@@ -49,7 +49,8 @@
} while (0)

#define COMEDI_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
#define COMEDI_VERSION_CODE COMEDI_VERSION(COMEDI_MAJORVERSION, COMEDI_MINORVERSION, COMEDI_MICROVERSION)
#define COMEDI_VERSION_CODE COMEDI_VERSION(COMEDI_MAJORVERSION, \
	COMEDI_MINORVERSION, COMEDI_MICROVERSION)
#define COMEDI_RELEASE VERSION

#define COMEDI_INITCLEANUP_NOMODULE(x)					\
@@ -58,12 +59,12 @@
	static void __exit x ## _cleanup_module(void)			\
		{comedi_driver_unregister(&(x)); } 			\
	module_init(x ## _init_module);					\
	module_exit(x ## _cleanup_module);					\
	module_exit(x ## _cleanup_module);

#define COMEDI_MODULE_MACROS						\
	MODULE_AUTHOR("Comedi http://www.comedi.org");		\
	MODULE_DESCRIPTION("Comedi low-level driver");			\
	MODULE_LICENSE("GPL");						\
	MODULE_LICENSE("GPL");

#define COMEDI_INITCLEANUP(x)						\
	COMEDI_MODULE_MACROS		\
@@ -75,7 +76,8 @@
	{ \
		return comedi_pci_auto_config(dev, comedi_driver.driver_name); \
	} \
	static void __devexit comedi_driver ## _pci_remove(struct pci_dev *dev) \
	static void __devexit comedi_driver ## _pci_remove(\
		struct pci_dev *dev) \
	{ \
		comedi_pci_auto_unconfig(dev); \
	} \
@@ -91,7 +93,8 @@
		retval = comedi_driver_register(&comedi_driver); \
		if (retval < 0) \
			return retval; \
		comedi_driver ## _pci_driver.name = (char *)comedi_driver.driver_name; \
			comedi_driver ## _pci_driver.name = \
				(char *)comedi_driver.driver_name; \
		return pci_register_driver(&comedi_driver ## _pci_driver); \
	} \
	static void __exit comedi_driver ## _cleanup_module(void) \
@@ -171,7 +174,8 @@ struct comedi_subdevice {
	int (*poll) (struct comedi_device *, struct comedi_subdevice *);
	int (*cancel) (struct comedi_device *, struct comedi_subdevice *);
	/* int (*do_lock)(struct comedi_device *, struct comedi_subdevice *); */
	/* int (*do_unlock)(struct comedi_device *,struct comedi_subdevice *); */
	/* int (*do_unlock)(struct comedi_device *, \
			struct comedi_subdevice *); */

	/* called when the buffer changes */
	int (*buf_change) (struct comedi_device *dev,
@@ -198,16 +202,22 @@ struct comedi_async {

	void *prealloc_buf;	/* pre-allocated buffer */
	unsigned int prealloc_bufsz;	/* buffer size, in bytes */
	struct comedi_buf_page *buf_page_list;	/* virtual and dma address of each page */
	/* virtual and dma address of each page */
	struct comedi_buf_page *buf_page_list;
	unsigned n_buf_pages;	/* num elements in buf_page_list */

	unsigned int max_bufsize;	/* maximum buffer size, bytes */
	unsigned int mmap_count;	/* current number of mmaps of prealloc_buf */

	unsigned int buf_write_count;	/* byte count for writer (write completed) */
	unsigned int buf_write_alloc_count;	/* byte count for writer (allocated for writing) */
	unsigned int buf_read_count;	/* byte count for reader (read completed) */
	unsigned int buf_read_alloc_count;	/* byte count for reader (allocated for reading) */
	/* current number of mmaps of prealloc_buf */
	unsigned int mmap_count;

	/* byte count for writer (write completed) */
	unsigned int buf_write_count;
	/* byte count for writer (allocated for writing) */
	unsigned int buf_write_alloc_count;
	/* byte count for reader (read completed) */
	unsigned int buf_read_count;
	/* byte count for reader (allocated for reading) */
	unsigned int buf_read_alloc_count;

	unsigned int buf_write_ptr;	/* buffer marker for writer */
	unsigned int buf_read_ptr;	/* buffer marker for reader */
@@ -318,9 +328,8 @@ static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1;

struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor);

static inline struct comedi_subdevice *comedi_get_read_subdevice(const struct
								 comedi_device_file_info
								 *info)
static inline struct comedi_subdevice *comedi_get_read_subdevice(
	const struct comedi_device_file_info *info)
{
	if (info->read_subdevice)
		return info->read_subdevice;
@@ -329,9 +338,8 @@ static inline struct comedi_subdevice *comedi_get_read_subdevice(const struct
	return info->device->read_subdev;
}

static inline struct comedi_subdevice *comedi_get_write_subdevice(const struct
								  comedi_device_file_info
								  *info)
static inline struct comedi_subdevice *comedi_get_write_subdevice(
	const struct comedi_device_file_info *info)
{
	if (info->write_subdevice)
		return info->write_subdevice;