Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166664
b: refs/heads/master
c: 75e3a6a
h: refs/heads/master
v: v3
  • Loading branch information
Breno Leitao authored and Linus Torvalds committed Oct 1, 2009
1 parent 2893d37 commit da8be2e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa76224a38530f9c69d1670c47fdeea30a420a73
refs/heads/master: 75e3a6aed99babdfa95f80d07421065ed004d186
54 changes: 26 additions & 28 deletions trunk/drivers/serial/icom.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static void stop_processor(struct icom_port *icom_port)
if (port < 4) {
temp = readl(stop_proc[port].global_control_reg);
temp =
(temp & ~start_proc[port].processor_id) | stop_proc[port].processor_id;
(temp & ~start_proc[port].processor_id) | stop_proc[port].processor_id;
writel(temp, stop_proc[port].global_control_reg);

/* write flush */
Expand Down Expand Up @@ -336,7 +336,7 @@ static void start_processor(struct icom_port *icom_port)
if (port < 4) {
temp = readl(start_proc[port].global_control_reg);
temp =
(temp & ~stop_proc[port].processor_id) | start_proc[port].processor_id;
(temp & ~stop_proc[port].processor_id) | start_proc[port].processor_id;
writel(temp, start_proc[port].global_control_reg);

/* write flush */
Expand Down Expand Up @@ -509,8 +509,8 @@ static void load_code(struct icom_port *icom_port)
dev_err(&icom_port->adapter->pci_dev->dev,"Port not opertional\n");
}

if (new_page != NULL)
pci_free_consistent(dev, 4096, new_page, temp_pci);
if (new_page != NULL)
pci_free_consistent(dev, 4096, new_page, temp_pci);
}

static int startup(struct icom_port *icom_port)
Expand Down Expand Up @@ -1493,15 +1493,15 @@ static int __devinit icom_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
int index;
unsigned int command_reg;
int retval;
struct icom_adapter *icom_adapter;
struct icom_port *icom_port;
unsigned int command_reg;
int retval;
struct icom_adapter *icom_adapter;
struct icom_port *icom_port;

retval = pci_enable_device(dev);
if (retval) {
retval = pci_enable_device(dev);
if (retval) {
dev_err(&dev->dev, "Device enable FAILED\n");
return retval;
return retval;
}

if ( (retval = pci_request_regions(dev, "icom"))) {
Expand All @@ -1510,23 +1510,23 @@ static int __devinit icom_probe(struct pci_dev *dev,
return retval;
}

pci_set_master(dev);
pci_set_master(dev);

if ( (retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg))) {
if ( (retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg))) {
dev_err(&dev->dev, "PCI Config read FAILED\n");
return retval;
}
return retval;
}

pci_write_config_dword(dev, PCI_COMMAND,
command_reg | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
| PCI_COMMAND_PARITY | PCI_COMMAND_SERR);

if (ent->driver_data == ADAPTER_V1) {
if (ent->driver_data == ADAPTER_V1) {
pci_write_config_dword(dev, 0x44, 0x8300830A);
} else {
} else {
pci_write_config_dword(dev, 0x44, 0x42004200);
pci_write_config_dword(dev, 0x48, 0x42004200);
}
}


retval = icom_alloc_adapter(&icom_adapter);
Expand All @@ -1536,10 +1536,10 @@ static int __devinit icom_probe(struct pci_dev *dev,
goto probe_exit0;
}

icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
icom_adapter->pci_dev = dev;
icom_adapter->version = ent->driver_data;
icom_adapter->subsystem_id = ent->subdevice;
icom_adapter->base_addr_pci = pci_resource_start(dev, 0);
icom_adapter->pci_dev = dev;
icom_adapter->version = ent->driver_data;
icom_adapter->subsystem_id = ent->subdevice;


retval = icom_init_ports(icom_adapter);
Expand All @@ -1548,7 +1548,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
goto probe_exit1;
}

icom_adapter->base_addr = pci_ioremap_bar(dev, 0);
icom_adapter->base_addr = pci_ioremap_bar(dev, 0);

if (!icom_adapter->base_addr)
goto probe_exit1;
Expand All @@ -1562,7 +1562,7 @@ static int __devinit icom_probe(struct pci_dev *dev,

retval = icom_load_ports(icom_adapter);

for (index = 0; index < icom_adapter->numb_ports; index++) {
for (index = 0; index < icom_adapter->numb_ports; index++) {
icom_port = &icom_adapter->port_info[index];

if (icom_port->status == ICOM_PORT_ACTIVE) {
Expand All @@ -1579,7 +1579,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
icom_port->status = ICOM_PORT_OFF;
dev_err(&dev->dev, "Device add failed\n");
} else
dev_info(&dev->dev, "Device added\n");
dev_info(&dev->dev, "Device added\n");
}
}

Expand All @@ -1595,9 +1595,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
pci_release_regions(dev);
pci_disable_device(dev);

return retval;


return retval;
}

static void __devexit icom_remove(struct pci_dev *dev)
Expand Down

0 comments on commit da8be2e

Please sign in to comment.