i8253.c 591 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) 2006 IBM Corporation
  3. *
  4. * Implements device information for i8253 timer chip
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License version
  8. * 2 as published by the Free Software Foundation
  9. */
  10. #include <linux/platform_device.h>
  11. static __init int add_pcspkr(void)
  12. {
  13. struct platform_device *pd;
  14. int ret;
  15. pd = platform_device_alloc("pcspkr", -1);
  16. if (!pd)
  17. return -ENOMEM;
  18. ret = platform_device_add(pd);
  19. if (ret)
  20. platform_device_put(pd);
  21. return ret;
  22. }
  23. device_initcall(add_pcspkr);