blob: 08ce3ed2ec1566a6b5d44c57ce464bd4f29addc1 [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
Andrew Sculld1d2c572022-05-30 10:00:08 +00009#include <dm.h>
10#include <fuzzing_engine.h>
11
12int dm_fuzzing_engine_get_input(struct udevice *dev,
13 const uint8_t **data,
14 size_t *size)
15{
16 const struct dm_fuzzing_engine_ops *ops = device_get_ops(dev);
17
18 if (!ops->get_input)
19 return -ENOSYS;
20
21 return ops->get_input(dev, data, size);
22}
23
24UCLASS_DRIVER(fuzzing_engine) = {
25 .name = "fuzzing_engine",
26 .id = UCLASS_FUZZING_ENGINE,
27};