mtd.h 445 B

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