diff options
author | Huang Shijie <b32955@freescale.com> | 2013-12-16 15:57:33 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:57:46 -0500 |
commit | 5e2ec0f0c2cae6c1195f1d94b56a9922e4333983 (patch) | |
tree | d84fdb39a3875d86ef5753cffb63a7adc4854e32 /include | |
parent | 0c498648ea3684c2eab3965ae235453b5a43204d (diff) |
ENGR00300430-5 mtd: spi-nor: add a helper to find the spi_device_id
Add the spi_nor_match_id() to find the proper spi_device_id with the
NOR flash's name in the spi_nor_ids table.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/spi-nor.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index f3237aa0a098..738cbfe8a337 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -184,4 +184,16 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id, enum read_mode mode); extern const struct spi_device_id spi_nor_ids[]; +/** + * spi_nor_match_id() - find the spi_device_id by the name + * @name: the name of the spi_device_id + * + * The drivers use this function to find the spi_device_id + * specified by the @name. + * + * Return: returns the right spi_device_id pointer on success, + * and returns NULL on failure. + */ +const struct spi_device_id *spi_nor_match_id(char *name); + #endif |