linux_spi.c: set SPI mode, bit order and bits per word on init

Previously we relied on a correctly set up state.

Also, we start to rely on the shutdown function for cleanup after
registering it, i.e. we no longer explicitly call close(fd) after

Corresponding to flashrom svn r1512.

Signed-off-by: Stefan Tauner <>
Tested-by: Denis 'GNUtoo' Carikli <>
Acked-by: Carl-Daniel Hailfinger <>
1 file changed