device: Add helper function devfn_disable()
commited5c7ac03109c325151ed5ced779c93540418f72
authorSubrata Banik <subrata.banik@intel.com>
Thu, 10 Jun 2021 07:34:07 +0000 (10 13:04 +0530)
committerSubrata Banik <subrata.banik@intel.com>
Thu, 17 Jun 2021 06:48:45 +0000 (17 06:48 +0000)
tree05f436b9b4409ddf51a0dfdad0a6caf68557098d
parent857c0cc332685d2401760c38d1f9c462088bae86
device: Add helper function devfn_disable()

devfn_disable() function is used to disable a device based on
given bus, device function number. This function checks if the
device is at enable state and disables the device.

Change-Id: Ia4a8bfec7fc95c729a5bb156f88e9aab3bf5dd41
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
src/device/device.c
src/include/device/device.h