Commit c5ad0c7b authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: jr3_pci: rename struct jr3_channel to jr3_sensor

The driver overloads the term "channel" a lot.  To help reduce
confusion, rename `struct jr3_channel` to `struct jr3_sensor`.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b612a976
...@@ -113,7 +113,7 @@ enum jr3_pci_poll_state { ...@@ -113,7 +113,7 @@ enum jr3_pci_poll_state {
}; };
struct jr3_pci_subdev_private { struct jr3_pci_subdev_private {
struct jr3_channel __iomem *channel; struct jr3_sensor __iomem *channel;
unsigned long next_time_min; unsigned long next_time_min;
enum jr3_pci_poll_state state; enum jr3_pci_poll_state state;
int serial_no; int serial_no;
...@@ -134,12 +134,12 @@ static struct jr3_pci_poll_delay poll_delay_min_max(int min, int max) ...@@ -134,12 +134,12 @@ static struct jr3_pci_poll_delay poll_delay_min_max(int min, int max)
return result; return result;
} }
static int is_complete(struct jr3_channel __iomem *channel) static int is_complete(struct jr3_sensor __iomem *channel)
{ {
return get_s16(&channel->command_word0) == 0; return get_s16(&channel->command_word0) == 0;
} }
static void set_transforms(struct jr3_channel __iomem *channel, static void set_transforms(struct jr3_sensor __iomem *channel,
const struct jr3_pci_transform *transf, short num) const struct jr3_pci_transform *transf, short num)
{ {
int i; int i;
...@@ -157,18 +157,18 @@ static void set_transforms(struct jr3_channel __iomem *channel, ...@@ -157,18 +157,18 @@ static void set_transforms(struct jr3_channel __iomem *channel,
} }
} }
static void use_transform(struct jr3_channel __iomem *channel, static void use_transform(struct jr3_sensor __iomem *channel,
short transf_num) 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(struct jr3_channel __iomem *channel, short offset_num) static void use_offset(struct jr3_sensor __iomem *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(struct jr3_channel __iomem *channel) static void set_offset(struct jr3_sensor __iomem *channel)
{ {
set_s16(&channel->command_word0, 0x0700); set_s16(&channel->command_word0, 0x0700);
} }
...@@ -182,7 +182,7 @@ struct six_axis_t { ...@@ -182,7 +182,7 @@ struct six_axis_t {
s16 mz; s16 mz;
}; };
static void set_full_scales(struct jr3_channel __iomem *channel, static void set_full_scales(struct jr3_sensor __iomem *channel,
struct six_axis_t full_scale) struct six_axis_t full_scale)
{ {
set_s16(&channel->full_scale.fx, full_scale.fx); set_s16(&channel->full_scale.fx, full_scale.fx);
...@@ -194,7 +194,7 @@ static void set_full_scales(struct jr3_channel __iomem *channel, ...@@ -194,7 +194,7 @@ static void set_full_scales(struct jr3_channel __iomem *channel,
set_s16(&channel->command_word0, 0x0a00); set_s16(&channel->command_word0, 0x0a00);
} }
static struct six_axis_t get_min_full_scales(struct jr3_channel __iomem static struct six_axis_t get_min_full_scales(struct jr3_sensor __iomem
*channel) *channel)
{ {
struct six_axis_t result; struct six_axis_t result;
...@@ -208,7 +208,7 @@ static struct six_axis_t get_min_full_scales(struct jr3_channel __iomem ...@@ -208,7 +208,7 @@ static struct six_axis_t get_min_full_scales(struct jr3_channel __iomem
return result; return result;
} }
static struct six_axis_t get_max_full_scales(struct jr3_channel __iomem static struct six_axis_t get_max_full_scales(struct jr3_sensor __iomem
*channel) *channel)
{ {
struct six_axis_t result; struct six_axis_t result;
...@@ -451,7 +451,7 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s) ...@@ -451,7 +451,7 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
{ {
struct jr3_pci_subdev_private *spriv = s->private; struct jr3_pci_subdev_private *spriv = s->private;
struct jr3_pci_poll_delay result = poll_delay_min_max(1000, 2000); struct jr3_pci_poll_delay result = poll_delay_min_max(1000, 2000);
struct jr3_channel __iomem *channel; struct jr3_sensor __iomem *channel;
u16 model_no; u16 model_no;
u16 serial_no; u16 serial_no;
int errors; int errors;
...@@ -673,7 +673,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -673,7 +673,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
static void jr3_pci_show_copyright(struct comedi_device *dev) static void jr3_pci_show_copyright(struct comedi_device *dev)
{ {
struct jr3_t __iomem *iobase = dev->mmio; struct jr3_t __iomem *iobase = dev->mmio;
struct jr3_channel __iomem *ch0data = &iobase->channel[0].data; struct jr3_sensor __iomem *ch0data = &iobase->channel[0].data;
char copy[ARRAY_SIZE(ch0data->copyright) + 1]; char copy[ARRAY_SIZE(ch0data->copyright) + 1];
int i; int i;
...@@ -695,10 +695,10 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, ...@@ -695,10 +695,10 @@ static int jr3_pci_auto_attach(struct comedi_device *dev,
int ret; int ret;
int i; int i;
if (sizeof(struct jr3_channel) != 0xc00) { if (sizeof(struct jr3_sensor) != 0xc00) {
dev_err(dev->class_dev, dev_err(dev->class_dev,
"sizeof(struct jr3_channel) = %x [expected %x]\n", "sizeof(struct jr3_sensor) = %x [expected %x]\n",
(unsigned int)sizeof(struct jr3_channel), 0xc00); (unsigned int)sizeof(struct jr3_sensor), 0xc00);
return -EINVAL; return -EINVAL;
} }
......
...@@ -280,7 +280,7 @@ struct intern_transform { ...@@ -280,7 +280,7 @@ struct intern_transform {
* and hardware manuals. * and hardware manuals.
*/ */
struct jr3_channel { struct jr3_sensor {
/* /*
* 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.
...@@ -727,7 +727,7 @@ struct jr3_channel { ...@@ -727,7 +727,7 @@ struct jr3_channel {
struct jr3_t { struct jr3_t {
struct { struct {
u32 program_lo[0x4000]; /* 0x00000 - 0x10000 */ u32 program_lo[0x4000]; /* 0x00000 - 0x10000 */
struct jr3_channel data; /* 0x10000 - 0x10c00 */ struct jr3_sensor data; /* 0x10000 - 0x10c00 */
char pad2[0x30000 - 0x00c00]; /* 0x10c00 - 0x40000 */ char pad2[0x30000 - 0x00c00]; /* 0x10c00 - 0x40000 */
u32 program_hi[0x8000]; /* 0x40000 - 0x60000 */ u32 program_hi[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