patch-2.4.19 linux-2.4.19/drivers/ieee1394/csr.c
Next file: linux-2.4.19/drivers/ieee1394/dv1394-private.h
Previous file: linux-2.4.19/drivers/ieee1394/cmp.h
Back to the patch index
Back to the overall index
- Lines: 130
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/ieee1394/csr.c
- Orig date:
Thu Jul 19 17:48:15 2001
diff -urN linux-2.4.18/drivers/ieee1394/csr.c linux-2.4.19/drivers/ieee1394/csr.c
@@ -70,7 +70,7 @@
{
host->csr.lock = SPIN_LOCK_UNLOCKED;
- host->csr.rom_size = host->template->get_rom(host, &host->csr.rom);
+ host->csr.rom_size = host->ops->get_rom(host, &host->csr.rom);
host->csr.state = 0;
host->csr.node_ids = 0;
@@ -152,7 +152,7 @@
case CSR_CYCLE_TIME:
oldcycle = host->csr.cycle_time;
host->csr.cycle_time =
- host->template->devctl(host, GET_CYCLE_COUNTER, 0);
+ host->ops->devctl(host, GET_CYCLE_COUNTER, 0);
if (oldcycle > host->csr.cycle_time) {
/* cycle time wrapped around */
@@ -163,7 +163,7 @@
case CSR_BUS_TIME:
oldcycle = host->csr.cycle_time;
host->csr.cycle_time =
- host->template->devctl(host, GET_CYCLE_COUNTER, 0);
+ host->ops->devctl(host, GET_CYCLE_COUNTER, 0);
if (oldcycle > host->csr.cycle_time) {
/* cycle time wrapped around */
@@ -181,32 +181,32 @@
return RCODE_ADDRESS_ERROR;
case CSR_BUS_MANAGER_ID:
- if (host->template->hw_csr_reg)
- ret = host->template->hw_csr_reg(host, 0, 0, 0);
+ if (host->ops->hw_csr_reg)
+ ret = host->ops->hw_csr_reg(host, 0, 0, 0);
else
ret = host->csr.bus_manager_id;
*(buf++) = cpu_to_be32(ret);
out;
case CSR_BANDWIDTH_AVAILABLE:
- if (host->template->hw_csr_reg)
- ret = host->template->hw_csr_reg(host, 1, 0, 0);
+ if (host->ops->hw_csr_reg)
+ ret = host->ops->hw_csr_reg(host, 1, 0, 0);
else
ret = host->csr.bandwidth_available;
*(buf++) = cpu_to_be32(ret);
out;
case CSR_CHANNELS_AVAILABLE_HI:
- if (host->template->hw_csr_reg)
- ret = host->template->hw_csr_reg(host, 2, 0, 0);
+ if (host->ops->hw_csr_reg)
+ ret = host->ops->hw_csr_reg(host, 2, 0, 0);
else
ret = host->csr.channels_available_hi;
*(buf++) = cpu_to_be32(ret);
out;
case CSR_CHANNELS_AVAILABLE_LO:
- if (host->template->hw_csr_reg)
- ret = host->template->hw_csr_reg(host, 3, 0, 0);
+ if (host->ops->hw_csr_reg)
+ ret = host->ops->hw_csr_reg(host, 3, 0, 0);
else
ret = host->csr.channels_available_lo;
@@ -244,7 +244,7 @@
host->csr.node_ids &= NODE_MASK << 16;
host->csr.node_ids |= be32_to_cpu(*(data++)) & (BUS_MASK << 16);
host->node_id = host->csr.node_ids >> 16;
- host->template->devctl(host, SET_BUS_ID, host->node_id >> 6);
+ host->ops->devctl(host, SET_BUS_ID, host->node_id >> 6);
out;
case CSR_RESET_START:
@@ -269,7 +269,7 @@
case CSR_CYCLE_TIME:
/* should only be set by cycle start packet, automatically */
host->csr.cycle_time = be32_to_cpu(*data);
- host->template->devctl(host, SET_CYCLE_COUNTER,
+ host->ops->devctl(host, SET_CYCLE_COUNTER,
be32_to_cpu(*(data++)));
out;
case CSR_BUS_TIME:
@@ -318,10 +318,10 @@
data = be32_to_cpu(data);
arg = be32_to_cpu(arg);
- if (host->template->hw_csr_reg) {
+ if (host->ops->hw_csr_reg) {
quadlet_t old;
- old = host->template->
+ old = host->ops->
hw_csr_reg(host, (csraddr - CSR_BUS_MANAGER_ID) >> 2,
data, arg);
@@ -402,23 +402,23 @@
static struct hpsb_highlevel_ops csr_ops = {
- add_host: add_host,
- host_reset: host_reset,
+ .add_host = add_host,
+ .host_reset = host_reset,
};
static struct hpsb_address_ops map_ops = {
- read: read_maps,
+ .read = read_maps,
};
static struct hpsb_address_ops fcp_ops = {
- write: write_fcp,
+ .write = write_fcp,
};
static struct hpsb_address_ops reg_ops = {
- read: read_regs,
- write: write_regs,
- lock: lock_regs,
+ .read = read_regs,
+ .write = write_regs,
+ .lock = lock_regs,
};
static struct hpsb_highlevel *hl;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)