fuzzing_engine-uclass.c 582 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2022 Google, Inc.
  4. * Written by Andrew Scull <ascull@google.com>
  5. */
  6. #define LOG_CATEGORY UCLASS_FUZZING_ENGINE
  7. #include <common.h>
  8. #include <dm.h>
  9. #include <fuzzing_engine.h>
  10. int dm_fuzzing_engine_get_input(struct udevice *dev,
  11. const uint8_t **data,
  12. size_t *size)
  13. {
  14. const struct dm_fuzzing_engine_ops *ops = device_get_ops(dev);
  15. if (!ops->get_input)
  16. return -ENOSYS;
  17. return ops->get_input(dev, data, size);
  18. }
  19. UCLASS_DRIVER(fuzzing_engine) = {
  20. .name = "fuzzing_engine",
  21. .id = UCLASS_FUZZING_ENGINE,
  22. };