Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Thomas Chou | d858799 | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw> |
Thomas Chou | d858799 | 2015-11-07 14:20:31 +0800 | [diff] [blame] | 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_ */ |