xref: /openbmc/u-boot/include/mtd.h (revision 2290fe06)
1 /*
2  * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 
7 #ifndef _MTD_H_
8 #define _MTD_H_
9 
10 #include <linux/mtd/mtd.h>
11 
12 /*
13  * Get mtd_info structure of the dev, which is stored as uclass private.
14  *
15  * @dev: The MTD device
16  * @return: pointer to mtd_info, NULL on error
17  */
18 static inline struct mtd_info *mtd_get_info(struct udevice *dev)
19 {
20 	return dev_get_uclass_priv(dev);
21 }
22 
23 #endif	/* _MTD_H_ */
24