Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ata_bd/main.c

    r7de1988c rc0dea01  
    8484        }
    8585
    86         addr_range_t *cmd_rng = &hw_res.io_ranges.ranges[0];
    87         addr_range_t *ctl_rng = &hw_res.io_ranges.ranges[1];
    88         ata_res->cmd = RNGABS(*cmd_rng);
    89         ata_res->ctl = RNGABS(*ctl_rng);
    90 
    91         if (RNGSZ(*ctl_rng) < sizeof(ata_ctl_t)) {
     86        ata_res->cmd = hw_res.io_ranges.ranges[0].address;
     87        ata_res->ctl = hw_res.io_ranges.ranges[1].address;
     88
     89        if (hw_res.io_ranges.ranges[0].size < sizeof(ata_ctl_t)) {
    9290                rc = EINVAL;
    9391                goto error;
    9492        }
    9593
    96         if (RNGSZ(*cmd_rng) < sizeof(ata_cmd_t)) {
     94        if (hw_res.io_ranges.ranges[1].size < sizeof(ata_cmd_t)) {
    9795                rc = EINVAL;
    9896                goto error;
Note: See TracChangeset for help on using the changeset viewer.