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