Ignore:
Timestamp:
Jul 19, 2017, 3:31:39 PM (5 years ago)
Author:
alain
Message:

Fixing bugs in vfs_lookup()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_mmc.c

    r188 r238  
    3636extern chdev_directory_t  chdev_dir;         // allocated in kernel_init.c
    3737
    38 ////////////////////////////////////
    39 void dev_mmc_init( chdev_t * chdev )
     38//////////////////////////////////
     39void dev_mmc_init( chdev_t * mmc )
    4040{
    4141    // get implementation from device descriptor
    42     uint32_t  impl = chdev->impl;
    43 
    44     // set chdev name
    45     snprintf( chdev->name , 16 , "mmc_%x" , local_cxy );
     42    uint32_t  impl = mmc->impl;
     43
     44    // set mmc name
     45    snprintf( mmc->name , 16 , "mmc_%x" , local_cxy );
    4646
    4747    // set driver specific fields in device descriptor and call driver init function
    4848    if( impl == IMPL_MMC_TSR )
    4949    {
    50         chdev->cmd = &soclib_mmc_cmd;
    51         chdev->isr = &soclib_mmc_isr;
    52         soclib_mmc_init( chdev );
     50        mmc->cmd = &soclib_mmc_cmd;
     51        mmc->isr = &soclib_mmc_isr;
     52        soclib_mmc_init( mmc );
    5353    }
    5454    else
     
    5858
    5959    // bind IRQ to CP0
    60     dev_pic_bind_irq( 0 , chdev );
     60    dev_pic_bind_irq( 0 , mmc );
    6161   
    6262    // enable IRQ
    63     dev_pic_enable_irq( 0 , chdev );
     63    dev_pic_enable_irq( 0 , XPTR( local_cxy , mmc ) );
    6464
    6565}  // end dev_mmc_init()
Note: See TracChangeset for help on using the changeset viewer.