summaryrefslogtreecommitdiffstats
path: root/sb600spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sb600spi.c')
-rw-r--r--sb600spi.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sb600spi.c b/sb600spi.c
index c4b25e527..5c6547548 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -570,6 +570,17 @@ static int promontory_read_memmapped(struct flashctx *flash, uint8_t *buf,
return 0;
}
+static int sb600spi_shutdown(void *data)
+{
+ struct sb600spi_data *sb600_data = data;
+ struct flashctx *flash = sb600_data->flash;
+ if (flash)
+ finalize_flash_access(flash);
+
+ free(data);
+ return 0;
+}
+
static const struct spi_master spi_master_sb600 = {
.max_data_read = FIFO_SIZE_OLD,
.max_data_write = FIFO_SIZE_OLD - 3,
@@ -600,17 +611,6 @@ static const struct spi_master spi_master_promontory = {
.write_aai = default_spi_write_aai,
};
-static int sb600spi_shutdown(void *data)
-{
- struct sb600spi_data *sb600_data = data;
- struct flashctx *flash = sb600_data->flash;
- if (flash)
- finalize_flash_access(flash);
-
- free(data);
- return 0;
-}
-
int sb600_probe_spi(struct pci_dev *dev)
{
struct pci_dev *smbus_dev;