blob: 548e7f191b53c04977c829439a7a86b0bc3a03bd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Thomas Choue51b65e2015-11-07 14:20:31 +08002/*
3 * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
Thomas Choue51b65e2015-11-07 14:20:31 +08004 */
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 */
17static inline struct mtd_info *mtd_get_info(struct udevice *dev)
18{
19 return dev_get_uclass_priv(dev);
20}
21
22#endif /* _MTD_H_ */