Use sysfs for flash device

Change-Id: I9213e4d391548e57e113787f2fddca5b69c430f8