summaryrefslogtreecommitdiff
path: root/drivers/fuzz/fuzzing_engine-uclass.c
blob: b16f1c4cfb71024890bf7f689273a47104107b2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (c) 2022 Google, Inc.
 * Written by Andrew Scull <ascull@google.com>
 */

#define LOG_CATEGORY UCLASS_FUZZING_ENGINE

#include <common.h>
#include <dm.h>
#include <fuzzing_engine.h>

int dm_fuzzing_engine_get_input(struct udevice *dev,
				const uint8_t **data,
				size_t *size)
{
	const struct dm_fuzzing_engine_ops *ops = device_get_ops(dev);

	if (!ops->get_input)
		return -ENOSYS;

	return ops->get_input(dev, data, size);
}

UCLASS_DRIVER(fuzzing_engine) = {
	.name = "fuzzing_engine",
	.id = UCLASS_FUZZING_ENGINE,
};