Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    rb16e77d r9d58539  
    191191        }
    192192
    193         printf("%s: Accepting connections\n", NAME);
     193        printf(NAME ": Accepting connections\n");
    194194        task_retval(0);
    195195        async_manager();
     
    243243static int ata_bd_init(void)
    244244{
     245        void *vaddr;
     246        int rc;
     247       
    245248        async_set_client_connection(ata_bd_connection);
    246         int rc = loc_server_register(NAME);
    247         if (rc != EOK) {
    248                 printf("%s: Unable to register driver.\n", NAME);
     249        rc = loc_server_register(NAME);
     250        if (rc < 0) {
     251                printf(NAME ": Unable to register driver.\n");
    249252                return rc;
    250253        }
    251        
    252         void *vaddr;
     254
    253255        rc = pio_enable((void *) cmd_physical, sizeof(ata_cmd_t), &vaddr);
    254256        if (rc != EOK) {
    255                 printf("%s: Could not initialize device I/O space.\n", NAME);
     257                printf(NAME ": Could not initialize device I/O space.\n");
    256258                return rc;
    257259        }
    258        
     260
    259261        cmd = vaddr;
    260        
     262
    261263        rc = pio_enable((void *) ctl_physical, sizeof(ata_ctl_t), &vaddr);
    262264        if (rc != EOK) {
    263                 printf("%s: Could not initialize device I/O space.\n", NAME);
     265                printf(NAME ": Could not initialize device I/O space.\n");
    264266                return rc;
    265267        }
    266        
     268
    267269        ctl = vaddr;
    268        
     270
     271
    269272        return EOK;
    270273}
Note: See TracChangeset for help on using the changeset viewer.