lm.h 590 B

123456789101112131415161718192021222324
  1. struct lm_device {
  2. struct device dev;
  3. struct resource resource;
  4. unsigned int irq;
  5. unsigned int id;
  6. };
  7. struct lm_driver {
  8. struct device_driver drv;
  9. int (*probe)(struct lm_device *);
  10. void (*remove)(struct lm_device *);
  11. int (*suspend)(struct lm_device *, pm_message_t);
  12. int (*resume)(struct lm_device *);
  13. };
  14. int lm_driver_register(struct lm_driver *drv);
  15. void lm_driver_unregister(struct lm_driver *drv);
  16. int lm_device_register(struct lm_device *dev);
  17. #define lm_get_drvdata(lm) dev_get_drvdata(&(lm)->dev)
  18. #define lm_set_drvdata(lm,d) dev_set_drvdata(&(lm)->dev, d)