mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			f_mount() (http://www.elm-chan.org/fsw/ff/00index_e.html - third party libary) API is called from both mount() and unmount() Mbed OS APIs.
f_mount() is doing both initializing (via find_volume() -> disk_initialize() where disk_initialize api calls Mbed OS init() function) underlying block device and register filesystem but in case of "unmount" calls this f_mount is doing deregister filesystem and missed to a deinitializing block device. So added the Mbed OS "deint()" call in unmount API to deinitialize block device as f_mount API doesn't have a way to call deinit().pull/14137/head
							parent
							
								
									15de1aae18
								
							
						
					
					
						commit
						a29e3cd5d8
					
				| 
						 | 
				
			
			@ -330,6 +330,11 @@ int FATFileSystem::unmount()
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    FRESULT res = f_mount(NULL, _fsid, 0);
 | 
			
		||||
    int err = _ffs[_id]->deinit();
 | 
			
		||||
    if (err) {
 | 
			
		||||
        unlock();
 | 
			
		||||
        return err;
 | 
			
		||||
    }
 | 
			
		||||
    _ffs[_id] = NULL;
 | 
			
		||||
    _id = -1;
 | 
			
		||||
    unlock();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue