mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 07:23:43 +02:00
stlinkv3_spi.c: Drop stlinkv3_ prefix for spi data struct member
The name of the struct already contains stlinkv3_ prefix, so prefix doesn't need to be repeated in members name. BUG=b:185191942 TEST=builds Change-Id: Ibddac9371ab8f08276d499642a9bdd6dbecea0ca Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/54043 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
This commit is contained in:
parent
7becf17942
commit
daa86b5301
@ -121,7 +121,7 @@ const struct dev_entry devs_stlinkv3_spi[] = {
|
|||||||
|
|
||||||
struct stlinkv3_spi_data {
|
struct stlinkv3_spi_data {
|
||||||
struct libusb_context *usb_ctx;
|
struct libusb_context *usb_ctx;
|
||||||
libusb_device_handle *stlinkv3_handle;
|
libusb_device_handle *handle;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int stlinkv3_command(uint8_t *command, size_t command_length,
|
static int stlinkv3_command(uint8_t *command, size_t command_length,
|
||||||
@ -349,7 +349,7 @@ static int stlinkv3_spi_transmit(const struct flashctx *flash,
|
|||||||
unsigned char *read_arr)
|
unsigned char *read_arr)
|
||||||
{
|
{
|
||||||
struct stlinkv3_spi_data *stlinkv3_data = flash->mst->spi.data;
|
struct stlinkv3_spi_data *stlinkv3_data = flash->mst->spi.data;
|
||||||
libusb_device_handle *stlinkv3_handle = stlinkv3_data->stlinkv3_handle;
|
libusb_device_handle *stlinkv3_handle = stlinkv3_data->handle;
|
||||||
uint8_t command[16];
|
uint8_t command[16];
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
int actual_length = 0;
|
int actual_length = 0;
|
||||||
@ -464,9 +464,9 @@ static int stlinkv3_spi_shutdown(void *data)
|
|||||||
stlinkv3_command(command, sizeof(command),
|
stlinkv3_command(command, sizeof(command),
|
||||||
answer, sizeof(answer),
|
answer, sizeof(answer),
|
||||||
"STLINK_BRIDGE_CLOSE",
|
"STLINK_BRIDGE_CLOSE",
|
||||||
stlinkv3_data->stlinkv3_handle);
|
stlinkv3_data->handle);
|
||||||
|
|
||||||
libusb_close(stlinkv3_data->stlinkv3_handle);
|
libusb_close(stlinkv3_data->handle);
|
||||||
libusb_exit(stlinkv3_data->usb_ctx);
|
libusb_exit(stlinkv3_data->usb_ctx);
|
||||||
|
|
||||||
free(data);
|
free(data);
|
||||||
@ -543,7 +543,7 @@ int stlinkv3_spi_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stlinkv3_data->usb_ctx = usb_ctx;
|
stlinkv3_data->usb_ctx = usb_ctx;
|
||||||
stlinkv3_data->stlinkv3_handle = stlinkv3_handle;
|
stlinkv3_data->handle = stlinkv3_handle;
|
||||||
|
|
||||||
if (register_shutdown(stlinkv3_spi_shutdown, stlinkv3_data))
|
if (register_shutdown(stlinkv3_spi_shutdown, stlinkv3_data))
|
||||||
goto init_err_cleanup_exit;
|
goto init_err_cleanup_exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user