Skip to content

Commit 5518bb4

Browse files
de-nordickartben
authored andcommitted
drivers/flash/flexspi_x25um51345g: Fix broken support for get_size
Fix incorrectly implemented flash_get_size callback. Fixes #82364 Signed-off-by: Dominik Ermel <[email protected]>
1 parent bdd7124 commit 5518bb4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/flash/flash_mcux_flexspi_mx25um51345g.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct flash_flexspi_nor_data {
6767
const struct device *controller;
6868
flexspi_device_config_t config;
6969
flexspi_port_t port;
70-
uint64_t *size;
70+
uint64_t size;
7171
struct flash_pages_layout layout;
7272
struct flash_parameters flash_parameters;
7373
};
@@ -500,9 +500,9 @@ static const struct flash_parameters *flash_flexspi_nor_get_parameters(
500500

501501
static int flash_flexspi_nor_get_size(const struct device *dev, uint64_t *size)
502502
{
503-
const struct flash_flexspi_nor_config *config = dev->config;
503+
const struct flash_flexspi_nor_data *data = dev->data;
504504

505-
*size = config->size;
505+
*size = data->size;
506506

507507
return 0;
508508
}

0 commit comments

Comments
 (0)