Skip to content

Commit 898ec22

Browse files
committed
ide: remove HWIF() macro
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent b40d1b8 commit 898ec22

35 files changed

Lines changed: 102 additions & 103 deletions

‎drivers/ide/aec62xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static u8 pci_bus_clock_list_ultra (u8 speed, struct chipset_bus_clock_list_entr
8383

8484
static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
8585
{
86-
ide_hwif_t *hwif = HWIF(drive);
86+
ide_hwif_t *hwif = drive->hwif;
8787
struct pci_dev *dev = to_pci_dev(hwif->dev);
8888
struct ide_host *host = pci_get_drvdata(dev);
8989
struct chipset_bus_clock_list_entry *bus_clock = host->host_priv;
@@ -111,7 +111,7 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
111111

112112
static void aec6260_set_mode(ide_drive_t *drive, const u8 speed)
113113
{
114-
ide_hwif_t *hwif = HWIF(drive);
114+
ide_hwif_t *hwif = drive->hwif;
115115
struct pci_dev *dev = to_pci_dev(hwif->dev);
116116
struct ide_host *host = pci_get_drvdata(dev);
117117
struct chipset_bus_clock_list_entry *bus_clock = host->host_priv;

‎drivers/ide/alim15x3.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static struct pci_dev *isa_dev;
6868

6969
static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
7070
{
71-
ide_hwif_t *hwif = HWIF(drive);
71+
ide_hwif_t *hwif = drive->hwif;
7272
struct pci_dev *dev = to_pci_dev(hwif->dev);
7373
struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
7474
int s_time = t->setup, a_time = t->active, c_time = t->cycle;
@@ -150,7 +150,7 @@ static u8 ali_udma_filter(ide_drive_t *drive)
150150

151151
static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed)
152152
{
153-
ide_hwif_t *hwif = HWIF(drive);
153+
ide_hwif_t *hwif = drive->hwif;
154154
struct pci_dev *dev = to_pci_dev(hwif->dev);
155155
u8 speed1 = speed;
156156
u8 unit = drive->dn & 1;

‎drivers/ide/au1xxx-ide.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static void auide_set_dma_mode(ide_drive_t *drive, const u8 speed)
212212
static int auide_build_dmatable(ide_drive_t *drive)
213213
{
214214
int i, iswrite, count = 0;
215-
ide_hwif_t *hwif = HWIF(drive);
215+
ide_hwif_t *hwif = drive->hwif;
216216
struct request *rq = hwif->rq;
217217
_auide_hwif *ahwif = &auide_hwif;
218218
struct scatterlist *sg;
@@ -286,7 +286,7 @@ static int auide_build_dmatable(ide_drive_t *drive)
286286

287287
static int auide_dma_end(ide_drive_t *drive)
288288
{
289-
ide_hwif_t *hwif = HWIF(drive);
289+
ide_hwif_t *hwif = drive->hwif;
290290

291291
if (hwif->sg_nents) {
292292
ide_destroy_dmatable(drive);

‎drivers/ide/cmd64x.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void program_cycle_times (ide_drive_t *drive, int cycle_time, int active_
115115
*/
116116
static void cmd64x_tune_pio(ide_drive_t *drive, const u8 pio)
117117
{
118-
ide_hwif_t *hwif = HWIF(drive);
118+
ide_hwif_t *hwif = drive->hwif;
119119
struct pci_dev *dev = to_pci_dev(hwif->dev);
120120
struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
121121
unsigned int cycle_time;
@@ -180,7 +180,7 @@ static void cmd64x_set_pio_mode(ide_drive_t *drive, const u8 pio)
180180

181181
static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)
182182
{
183-
ide_hwif_t *hwif = HWIF(drive);
183+
ide_hwif_t *hwif = drive->hwif;
184184
struct pci_dev *dev = to_pci_dev(hwif->dev);
185185
u8 unit = drive->dn & 0x01;
186186
u8 regU = 0, pciU = hwif->channel ? UDIDETCR1 : UDIDETCR0;
@@ -226,7 +226,7 @@ static void cmd64x_set_dma_mode(ide_drive_t *drive, const u8 speed)
226226

227227
static int cmd648_dma_end(ide_drive_t *drive)
228228
{
229-
ide_hwif_t *hwif = HWIF(drive);
229+
ide_hwif_t *hwif = drive->hwif;
230230
unsigned long base = hwif->dma_base - (hwif->channel * 8);
231231
int err = ide_dma_end(drive);
232232
u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 :
@@ -242,7 +242,7 @@ static int cmd648_dma_end(ide_drive_t *drive)
242242

243243
static int cmd64x_dma_end(ide_drive_t *drive)
244244
{
245-
ide_hwif_t *hwif = HWIF(drive);
245+
ide_hwif_t *hwif = drive->hwif;
246246
struct pci_dev *dev = to_pci_dev(hwif->dev);
247247
int irq_reg = hwif->channel ? ARTTIM23 : CFR;
248248
u8 irq_mask = hwif->channel ? ARTTIM23_INTR_CH1 :
@@ -259,7 +259,7 @@ static int cmd64x_dma_end(ide_drive_t *drive)
259259

260260
static int cmd648_dma_test_irq(ide_drive_t *drive)
261261
{
262-
ide_hwif_t *hwif = HWIF(drive);
262+
ide_hwif_t *hwif = drive->hwif;
263263
unsigned long base = hwif->dma_base - (hwif->channel * 8);
264264
u8 irq_mask = hwif->channel ? MRDMODE_INTR_CH1 :
265265
MRDMODE_INTR_CH0;
@@ -282,7 +282,7 @@ static int cmd648_dma_test_irq(ide_drive_t *drive)
282282

283283
static int cmd64x_dma_test_irq(ide_drive_t *drive)
284284
{
285-
ide_hwif_t *hwif = HWIF(drive);
285+
ide_hwif_t *hwif = drive->hwif;
286286
struct pci_dev *dev = to_pci_dev(hwif->dev);
287287
int irq_reg = hwif->channel ? ARTTIM23 : CFR;
288288
u8 irq_mask = hwif->channel ? ARTTIM23_INTR_CH1 :
@@ -313,7 +313,7 @@ static int cmd64x_dma_test_irq(ide_drive_t *drive)
313313

314314
static int cmd646_1_dma_end(ide_drive_t *drive)
315315
{
316-
ide_hwif_t *hwif = HWIF(drive);
316+
ide_hwif_t *hwif = drive->hwif;
317317
u8 dma_stat = 0, dma_cmd = 0;
318318

319319
drive->waiting_for_dma = 0;

‎drivers/ide/cs5520.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static struct pio_clocks cs5520_pio_clocks[]={
5959

6060
static void cs5520_set_pio_mode(ide_drive_t *drive, const u8 pio)
6161
{
62-
ide_hwif_t *hwif = HWIF(drive);
62+
ide_hwif_t *hwif = drive->hwif;
6363
struct pci_dev *pdev = to_pci_dev(hwif->dev);
6464
int controller = drive->dn > 1 ? 1 : 0;
6565

‎drivers/ide/cy82c693.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static void cy82c693_set_dma_mode(ide_drive_t *drive, const u8 mode)
203203

204204
static void cy82c693_set_pio_mode(ide_drive_t *drive, const u8 pio)
205205
{
206-
ide_hwif_t *hwif = HWIF(drive);
206+
ide_hwif_t *hwif = drive->hwif;
207207
struct pci_dev *dev = to_pci_dev(hwif->dev);
208208
pio_clocks_t pclk;
209209
unsigned int addrCtrl;

‎drivers/ide/hpt366.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ static struct hpt_info *hpt3xx_get_info(struct device *dev)
626626

627627
static u8 hpt3xx_udma_filter(ide_drive_t *drive)
628628
{
629-
ide_hwif_t *hwif = HWIF(drive);
629+
ide_hwif_t *hwif = drive->hwif;
630630
struct hpt_info *info = hpt3xx_get_info(hwif->dev);
631631
u8 mask = hwif->ultra_mask;
632632

@@ -665,7 +665,7 @@ static u8 hpt3xx_udma_filter(ide_drive_t *drive)
665665

666666
static u8 hpt3xx_mdma_filter(ide_drive_t *drive)
667667
{
668-
ide_hwif_t *hwif = HWIF(drive);
668+
ide_hwif_t *hwif = drive->hwif;
669669
struct hpt_info *info = hpt3xx_get_info(hwif->dev);
670670

671671
switch (info->chip_type) {
@@ -743,7 +743,7 @@ static void hpt3xx_quirkproc(ide_drive_t *drive)
743743

744744
static void hpt3xx_maskproc(ide_drive_t *drive, int mask)
745745
{
746-
ide_hwif_t *hwif = HWIF(drive);
746+
ide_hwif_t *hwif = drive->hwif;
747747
struct pci_dev *dev = to_pci_dev(hwif->dev);
748748
struct hpt_info *info = hpt3xx_get_info(hwif->dev);
749749

@@ -788,7 +788,7 @@ static void hpt366_dma_lost_irq(ide_drive_t *drive)
788788

789789
static void hpt370_clear_engine(ide_drive_t *drive)
790790
{
791-
ide_hwif_t *hwif = HWIF(drive);
791+
ide_hwif_t *hwif = drive->hwif;
792792
struct pci_dev *dev = to_pci_dev(hwif->dev);
793793

794794
pci_write_config_byte(dev, hwif->select_data, 0x37);
@@ -797,7 +797,7 @@ static void hpt370_clear_engine(ide_drive_t *drive)
797797

798798
static void hpt370_irq_timeout(ide_drive_t *drive)
799799
{
800-
ide_hwif_t *hwif = HWIF(drive);
800+
ide_hwif_t *hwif = drive->hwif;
801801
struct pci_dev *dev = to_pci_dev(hwif->dev);
802802
u16 bfifo = 0;
803803
u8 dma_cmd;
@@ -822,7 +822,7 @@ static void hpt370_dma_start(ide_drive_t *drive)
822822

823823
static int hpt370_dma_end(ide_drive_t *drive)
824824
{
825-
ide_hwif_t *hwif = HWIF(drive);
825+
ide_hwif_t *hwif = drive->hwif;
826826
u8 dma_stat = inb(hwif->dma_base + ATA_DMA_STATUS);
827827

828828
if (dma_stat & 0x01) {
@@ -844,7 +844,7 @@ static void hpt370_dma_timeout(ide_drive_t *drive)
844844
/* returns 1 if DMA IRQ issued, 0 otherwise */
845845
static int hpt374_dma_test_irq(ide_drive_t *drive)
846846
{
847-
ide_hwif_t *hwif = HWIF(drive);
847+
ide_hwif_t *hwif = drive->hwif;
848848
struct pci_dev *dev = to_pci_dev(hwif->dev);
849849
u16 bfifo = 0;
850850
u8 dma_stat;
@@ -865,7 +865,7 @@ static int hpt374_dma_test_irq(ide_drive_t *drive)
865865

866866
static int hpt374_dma_end(ide_drive_t *drive)
867867
{
868-
ide_hwif_t *hwif = HWIF(drive);
868+
ide_hwif_t *hwif = drive->hwif;
869869
struct pci_dev *dev = to_pci_dev(hwif->dev);
870870
u8 mcr = 0, mcr_addr = hwif->select_data;
871871
u8 bwsr = 0, mask = hwif->channel ? 0x02 : 0x01;
@@ -927,7 +927,7 @@ static void hpt3xxn_set_clock(ide_hwif_t *hwif, u8 mode)
927927

928928
static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq)
929929
{
930-
hpt3xxn_set_clock(HWIF(drive), rq_data_dir(rq) ? 0x23 : 0x21);
930+
hpt3xxn_set_clock(drive->hwif, rq_data_dir(rq) ? 0x23 : 0x21);
931931
}
932932

933933
/**

‎drivers/ide/icside.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static const expansioncard_ops_t icside_ops_arcin_v6 = {
166166
*/
167167
static void icside_maskproc(ide_drive_t *drive, int mask)
168168
{
169-
ide_hwif_t *hwif = HWIF(drive);
169+
ide_hwif_t *hwif = drive->hwif;
170170
struct expansion_card *ec = ECARD_DEV(hwif->dev);
171171
struct icside_state *state = ecard_get_drvdata(ec);
172172
unsigned long flags;
@@ -284,7 +284,7 @@ static void icside_dma_host_set(ide_drive_t *drive, int on)
284284

285285
static int icside_dma_end(ide_drive_t *drive)
286286
{
287-
ide_hwif_t *hwif = HWIF(drive);
287+
ide_hwif_t *hwif = drive->hwif;
288288
struct expansion_card *ec = ECARD_DEV(hwif->dev);
289289

290290
drive->waiting_for_dma = 0;
@@ -299,7 +299,7 @@ static int icside_dma_end(ide_drive_t *drive)
299299

300300
static void icside_dma_start(ide_drive_t *drive)
301301
{
302-
ide_hwif_t *hwif = HWIF(drive);
302+
ide_hwif_t *hwif = drive->hwif;
303303
struct expansion_card *ec = ECARD_DEV(hwif->dev);
304304

305305
/* We can not enable DMA on both channels simultaneously. */
@@ -309,7 +309,7 @@ static void icside_dma_start(ide_drive_t *drive)
309309

310310
static int icside_dma_setup(ide_drive_t *drive)
311311
{
312-
ide_hwif_t *hwif = HWIF(drive);
312+
ide_hwif_t *hwif = drive->hwif;
313313
struct expansion_card *ec = ECARD_DEV(hwif->dev);
314314
struct icside_state *state = ecard_get_drvdata(ec);
315315
struct request *rq = hwif->rq;
@@ -362,7 +362,7 @@ static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
362362

363363
static int icside_dma_test_irq(ide_drive_t *drive)
364364
{
365-
ide_hwif_t *hwif = HWIF(drive);
365+
ide_hwif_t *hwif = drive->hwif;
366366
struct expansion_card *ec = ECARD_DEV(hwif->dev);
367367
struct icside_state *state = ecard_get_drvdata(ec);
368368

‎drivers/ide/ide-acpi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static acpi_handle ide_acpi_hwif_get_handle(ide_hwif_t *hwif)
218218
*/
219219
static acpi_handle ide_acpi_drive_get_handle(ide_drive_t *drive)
220220
{
221-
ide_hwif_t *hwif = HWIF(drive);
221+
ide_hwif_t *hwif = drive->hwif;
222222
int port;
223223
acpi_handle drive_handle;
224224

@@ -263,7 +263,7 @@ static int do_drive_get_GTF(ide_drive_t *drive,
263263
acpi_status status;
264264
struct acpi_buffer output;
265265
union acpi_object *out_obj;
266-
ide_hwif_t *hwif = HWIF(drive);
266+
ide_hwif_t *hwif = drive->hwif;
267267
struct device *dev = hwif->gendev.parent;
268268
int err = -ENODEV;
269269
int port;

‎drivers/ide/ide-disk.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static void ide_tf_set_cmd(ide_drive_t *drive, ide_task_t *task, u8 dma)
8989
static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
9090
sector_t block)
9191
{
92-
ide_hwif_t *hwif = HWIF(drive);
92+
ide_hwif_t *hwif = drive->hwif;
9393
u16 nsectors = (u16)rq->nr_sectors;
9494
u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);
9595
u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
@@ -187,7 +187,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
187187
static ide_startstop_t ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
188188
sector_t block)
189189
{
190-
ide_hwif_t *hwif = HWIF(drive);
190+
ide_hwif_t *hwif = drive->hwif;
191191

192192
BUG_ON(drive->dev_flags & IDE_DFLAG_BLOCKED);
193193

0 commit comments

Comments
 (0)