Changeset 1885

Show
Ignore:
Timestamp:
02/01/09 18:44:33 (3 years ago)
Author:
mwhitworth
Message:

Fix function parameters to address #64.

Location:
Whitix/trunk/devices/storage/ata
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • Whitix/trunk/devices/storage/ata/ata-cd.c

    r1871 r1885  
    225225} 
    226226 
    227 int AtapiReadWrite(struct Request* request,struct AtaDrive* drive,int type) 
     227int AtapiReadWrite(struct Request* request, struct AtaDrive* drive) 
    228228{ 
    229229        struct AtaController* control=drive->parent; 
  • Whitix/trunk/devices/storage/ata/ata-disk.c

    r1809 r1885  
    6464 
    6565        if (request->numSectors > 0) 
    66                 AtaReadWrite(request, drive, request->type); 
     66                AtaReadWrite(request, drive); 
    6767        else 
    6868                AtaFinishRequest(drive, 0); 
    6969} 
    7070 
    71 int AtaReadWrite(struct Request* request, struct AtaDrive* drive, int type) 
     71int AtaReadWrite(struct Request* request, struct AtaDrive* drive) 
    7272{ 
    7373        struct AtaCommand command; 
     
    8282        command.driveNum=drive->drive; 
    8383        command.ldh=(command.driveNum << 4) | LDH_DEFAULT; 
    84         command.command=(type == REQUEST_WRITE ? CMD_ATA_WRITE : CMD_ATA_READ); 
     84        command.command=(request->type == REQUEST_WRITE ? CMD_ATA_WRITE : CMD_ATA_READ); 
    8585        command.block=request->sector; 
    8686        command.count=1; /* For now */ 
  • Whitix/trunk/devices/storage/ata/ata.c

    r1872 r1885  
    205205 
    206206        if (drive->type & ATA_DISK) 
    207                 err = AtaReadWrite(request, drive, request->type); 
     207                err = AtaReadWrite(request, drive); 
    208208        else 
    209                 err = AtapiReadWrite(request, drive, request->type); 
     209                err = AtapiReadWrite(request, drive); 
    210210                 
    211211        /* Set up the timer, which will expire if we happen to miss an interrupt 
  • Whitix/trunk/devices/storage/ata/ata.h

    r1872 r1885  
    1616 * 
    1717 */ 
    18  
    19 /* TODO: ReadWrite function doesn't need type parameter. Remove. */ 
    2018 
    2119#ifndef ATA_H 
     
    202200 
    203201/* Drive-specific functions */ 
    204 int AtaReadWrite(struct Request* request,struct AtaDrive* drive,int type); 
    205 int AtapiReadWrite(struct Request* request,struct AtaDrive* drive,int type); 
     202int AtaReadWrite(struct Request* request, struct AtaDrive* drive); 
     203int AtapiReadWrite(struct Request* request, struct AtaDrive* drive); 
    206204 
    207205#endif