mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
reset: Return 0 if ops unimplemented and remove empty functions
In case the ops is not implemented, return 0 in the core right away. This is better than having multiple copies of functions which just return 0 in each reset driver. Drop all those empty functions. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -18,11 +18,6 @@ static int raspberrypi_reset_request(struct reset_ctl *reset_ctl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int raspberrypi_reset_free(struct reset_ctl *reset_ctl)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int raspberrypi_reset_assert(struct reset_ctl *reset_ctl)
|
||||
{
|
||||
switch (reset_ctl->id) {
|
||||
@@ -34,16 +29,9 @@ static int raspberrypi_reset_assert(struct reset_ctl *reset_ctl)
|
||||
}
|
||||
}
|
||||
|
||||
static int raspberrypi_reset_deassert(struct reset_ctl *reset_ctl)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct reset_ops raspberrypi_reset_ops = {
|
||||
.request = raspberrypi_reset_request,
|
||||
.rfree = raspberrypi_reset_free,
|
||||
.rst_assert = raspberrypi_reset_assert,
|
||||
.rst_deassert = raspberrypi_reset_deassert,
|
||||
};
|
||||
|
||||
static const struct udevice_id raspberrypi_reset_ids[] = {
|
||||
|
Reference in New Issue
Block a user