mtd.h 445 B

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