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