Commit 67080790 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove jr3_channel_t typedef

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1c31ddaf
...@@ -141,7 +141,7 @@ typedef struct { ...@@ -141,7 +141,7 @@ typedef struct {
} poll_delay_t; } poll_delay_t;
typedef struct { typedef struct {
volatile jr3_channel_t *channel; volatile struct jr3_channel *channel;
unsigned long next_time_min; unsigned long next_time_min;
unsigned long next_time_max; unsigned long next_time_max;
enum { state_jr3_poll, enum { state_jr3_poll,
...@@ -173,7 +173,7 @@ static poll_delay_t poll_delay_min_max(int min, int max) ...@@ -173,7 +173,7 @@ static poll_delay_t poll_delay_min_max(int min, int max)
return result; return result;
} }
static int is_complete(volatile jr3_channel_t * channel) static int is_complete(volatile struct jr3_channel *channel)
{ {
return get_s16(&channel->command_word0) == 0; return get_s16(&channel->command_word0) == 0;
} }
...@@ -185,7 +185,7 @@ typedef struct { ...@@ -185,7 +185,7 @@ typedef struct {
} link[8]; } link[8];
} transform_t; } transform_t;
static void set_transforms(volatile jr3_channel_t * channel, static void set_transforms(volatile struct jr3_channel *channel,
transform_t transf, short num) transform_t transf, short num)
{ {
int i; int i;
...@@ -205,17 +205,17 @@ static void set_transforms(volatile jr3_channel_t * channel, ...@@ -205,17 +205,17 @@ static void set_transforms(volatile jr3_channel_t * channel,
} }
} }
static void use_transform(volatile jr3_channel_t * channel, short transf_num) static void use_transform(volatile struct jr3_channel *channel, short transf_num)
{ {
set_s16(&channel->command_word0, 0x0500 + (transf_num & 0x000f)); set_s16(&channel->command_word0, 0x0500 + (transf_num & 0x000f));
} }
static void use_offset(volatile jr3_channel_t * channel, short offset_num) static void use_offset(volatile struct jr3_channel *channel, short offset_num)
{ {
set_s16(&channel->command_word0, 0x0600 + (offset_num & 0x000f)); set_s16(&channel->command_word0, 0x0600 + (offset_num & 0x000f));
} }
static void set_offset(volatile jr3_channel_t * channel) static void set_offset(volatile struct jr3_channel *channel)
{ {
set_s16(&channel->command_word0, 0x0700); set_s16(&channel->command_word0, 0x0700);
} }
...@@ -229,7 +229,7 @@ typedef struct { ...@@ -229,7 +229,7 @@ typedef struct {
s16 mz; s16 mz;
} six_axis_t; } six_axis_t;
static void set_full_scales(volatile jr3_channel_t * channel, static void set_full_scales(volatile struct jr3_channel *channel,
six_axis_t full_scale) six_axis_t full_scale)
{ {
printk("%d %d %d %d %d %d\n", printk("%d %d %d %d %d %d\n",
...@@ -245,7 +245,7 @@ static void set_full_scales(volatile jr3_channel_t * channel, ...@@ -245,7 +245,7 @@ static void set_full_scales(volatile jr3_channel_t * channel,
set_s16(&channel->command_word0, 0x0a00); set_s16(&channel->command_word0, 0x0a00);
} }
static six_axis_t get_min_full_scales(volatile jr3_channel_t * channel) static six_axis_t get_min_full_scales(volatile struct jr3_channel *channel)
{ {
six_axis_t result; six_axis_t result;
result.fx = get_s16(&channel->min_full_scale.fx); result.fx = get_s16(&channel->min_full_scale.fx);
...@@ -257,7 +257,7 @@ static six_axis_t get_min_full_scales(volatile jr3_channel_t * channel) ...@@ -257,7 +257,7 @@ static six_axis_t get_min_full_scales(volatile jr3_channel_t * channel)
return result; return result;
} }
static six_axis_t get_max_full_scales(volatile jr3_channel_t * channel) static six_axis_t get_max_full_scales(volatile struct jr3_channel *channel)
{ {
six_axis_t result; six_axis_t result;
result.fx = get_s16(&channel->max_full_scale.fx); result.fx = get_s16(&channel->max_full_scale.fx);
...@@ -529,7 +529,7 @@ static poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice * s) ...@@ -529,7 +529,7 @@ static poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice * s)
jr3_pci_subdev_private *p = s->private; jr3_pci_subdev_private *p = s->private;
if (p) { if (p) {
volatile jr3_channel_t *channel = p->channel; volatile struct jr3_channel *channel = p->channel;
int errors = get_u16(&channel->errors); int errors = get_u16(&channel->errors);
if (errors != p->errors) { if (errors != p->errors) {
...@@ -782,9 +782,9 @@ static int jr3_pci_attach(struct comedi_device * dev, struct comedi_devconfig * ...@@ -782,9 +782,9 @@ static int jr3_pci_attach(struct comedi_device * dev, struct comedi_devconfig *
opt_bus = it->options[0]; opt_bus = it->options[0];
opt_slot = it->options[1]; opt_slot = it->options[1];
if (sizeof(jr3_channel_t) != 0xc00) { if (sizeof(struct jr3_channel) != 0xc00) {
printk("sizeof(jr3_channel_t) = %x [expected %x]\n", printk("sizeof(struct jr3_channel) = %x [expected %x]\n",
(unsigned)sizeof(jr3_channel_t), 0xc00); (unsigned)sizeof(struct jr3_channel), 0xc00);
return -EINVAL; return -EINVAL;
} }
......
...@@ -264,7 +264,7 @@ struct intern_transform { ...@@ -264,7 +264,7 @@ struct intern_transform {
/* JR3 force/torque sensor data definition. For more information see sensor and */ /* JR3 force/torque sensor data definition. For more information see sensor and */
/* hardware manuals. */ /* hardware manuals. */
typedef struct force_sensor_data { struct jr3_channel {
/* Raw_channels is the area used to store the raw data coming from */ /* Raw_channels is the area used to store the raw data coming from */
/* the sensor. */ /* the sensor. */
...@@ -667,12 +667,12 @@ typedef struct force_sensor_data { ...@@ -667,12 +667,12 @@ typedef struct force_sensor_data {
*/ */
struct intern_transform transforms[0x10]; /* offset 0x0200 */ struct intern_transform transforms[0x10]; /* offset 0x0200 */
} jr3_channel_t; };
struct jr3_t { struct jr3_t {
struct { struct {
u32 program_low[0x4000]; /* 0x00000 - 0x10000 */ u32 program_low[0x4000]; /* 0x00000 - 0x10000 */
jr3_channel_t data; /* 0x10000 - 0x10c00 */ struct jr3_channel data; /* 0x10000 - 0x10c00 */
char pad2[0x30000 - 0x00c00]; /* 0x10c00 - 0x40000 */ char pad2[0x30000 - 0x00c00]; /* 0x10c00 - 0x40000 */
u32 program_high[0x8000]; /* 0x40000 - 0x60000 */ u32 program_high[0x8000]; /* 0x40000 - 0x60000 */
u32 reset; /* 0x60000 - 0x60004 */ u32 reset; /* 0x60000 - 0x60004 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment