aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_uli.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_uli.c')
-rw-r--r--drivers/ata/sata_uli.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c
index d394da085ae4..e710e71b7b92 100644
--- a/drivers/ata/sata_uli.c
+++ b/drivers/ata/sata_uli.c
@@ -56,9 +56,9 @@ struct uli_priv {
56 unsigned int scr_cfg_addr[uli_max_ports]; 56 unsigned int scr_cfg_addr[uli_max_ports];
57}; 57};
58 58
59static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); 59static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
60static int uli_scr_read (struct ata_port *ap, unsigned int sc_reg, u32 *val); 60static int uli_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val);
61static int uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); 61static int uli_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val);
62 62
63static const struct pci_device_id uli_pci_tbl[] = { 63static const struct pci_device_id uli_pci_tbl[] = {
64 { PCI_VDEVICE(AL, 0x5289), uli_5289 }, 64 { PCI_VDEVICE(AL, 0x5289), uli_5289 },
@@ -143,7 +143,7 @@ static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
143 return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg); 143 return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg);
144} 144}
145 145
146static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) 146static u32 uli_scr_cfg_read(struct ata_port *ap, unsigned int sc_reg)
147{ 147{
148 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 148 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
149 unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg); 149 unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
@@ -153,7 +153,7 @@ static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
153 return val; 153 return val;
154} 154}
155 155
156static void uli_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val) 156static void uli_scr_cfg_write(struct ata_port *ap, unsigned int scr, u32 val)
157{ 157{
158 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 158 struct pci_dev *pdev = to_pci_dev(ap->host->dev);
159 unsigned int cfg_addr = get_scr_cfg_addr(ap, scr); 159 unsigned int cfg_addr = get_scr_cfg_addr(ap, scr);
@@ -161,7 +161,7 @@ static void uli_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
161 pci_write_config_dword(pdev, cfg_addr, val); 161 pci_write_config_dword(pdev, cfg_addr, val);
162} 162}
163 163
164static int uli_scr_read (struct ata_port *ap, unsigned int sc_reg, u32 *val) 164static int uli_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
165{ 165{
166 if (sc_reg > SCR_CONTROL) 166 if (sc_reg > SCR_CONTROL)
167 return -EINVAL; 167 return -EINVAL;
@@ -170,16 +170,16 @@ static int uli_scr_read (struct ata_port *ap, unsigned int sc_reg, u32 *val)
170 return 0; 170 return 0;
171} 171}
172 172
173static int uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) 173static int uli_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val)
174{ 174{
175 if (sc_reg > SCR_CONTROL) //SCR_CONTROL=2, SCR_ERROR=1, SCR_STATUS=0 175 if (sc_reg > SCR_CONTROL) //SCR_CONTROL=2, SCR_ERROR=1, SCR_STATUS=0
176 return -EINVAL; 176 return -EINVAL;
177 177
178 uli_scr_cfg_write(ap, sc_reg, val); 178 uli_scr_cfg_write(ap, sc_reg, val);
179 return 0; 179 return 0;
180} 180}
181 181
182static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) 182static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
183{ 183{
184 static int printed_version; 184 static int printed_version;
185 const struct ata_port_info *ppi[] = { &uli_port_info, NULL }; 185 const struct ata_port_info *ppi[] = { &uli_port_info, NULL };