atmdev_init.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* drivers/atm/atmdev_init.c - ATM device driver initialization */
  2. /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
  3. #include <linux/config.h>
  4. #include <linux/init.h>
  5. #ifdef CONFIG_ATM_ZATM
  6. extern int zatm_detect(void);
  7. #endif
  8. #ifdef CONFIG_ATM_AMBASSADOR
  9. extern int amb_detect(void);
  10. #endif
  11. #ifdef CONFIG_ATM_HORIZON
  12. extern int hrz_detect(void);
  13. #endif
  14. #ifdef CONFIG_ATM_FORE200E
  15. extern int fore200e_detect(void);
  16. #endif
  17. #ifdef CONFIG_ATM_LANAI
  18. extern int lanai_detect(void);
  19. #endif
  20. /*
  21. * For historical reasons, atmdev_init returns the number of devices found.
  22. * Note that some detections may not go via atmdev_init (e.g. eni.c), so this
  23. * number is meaningless.
  24. */
  25. int __init atmdev_init(void)
  26. {
  27. int devs;
  28. devs = 0;
  29. #ifdef CONFIG_ATM_ZATM
  30. devs += zatm_detect();
  31. #endif
  32. #ifdef CONFIG_ATM_AMBASSADOR
  33. devs += amb_detect();
  34. #endif
  35. #ifdef CONFIG_ATM_HORIZON
  36. devs += hrz_detect();
  37. #endif
  38. #ifdef CONFIG_ATM_FORE200E
  39. devs += fore200e_detect();
  40. #endif
  41. #ifdef CONFIG_ATM_LANAI
  42. devs += lanai_detect();
  43. #endif
  44. return devs;
  45. }