soc/amd/picasso/chip: use switch/case statement in enable_dev()

The default case is only needed to make the compiler happy.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Idf54e7128f9e9d96f15ac7ab121f22621e033fac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49941
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2021-01-26 18:05:21 +01:00
parent 78f52fb7d6
commit cbd5bb9cc7
1 changed files with 9 additions and 3 deletions

View File

@ -82,12 +82,18 @@ static void set_mmio_dev_ops(struct device *dev)
static void enable_dev(struct device *dev) static void enable_dev(struct device *dev)
{ {
/* Set the operations if it is a special bus type */ /* Set the operations if it is a special bus type */
if (dev->path.type == DEVICE_PATH_DOMAIN) { switch (dev->path.type) {
case DEVICE_PATH_DOMAIN:
dev->ops = &pci_domain_ops; dev->ops = &pci_domain_ops;
} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) { break;
case DEVICE_PATH_CPU_CLUSTER:
dev->ops = &cpu_bus_ops; dev->ops = &cpu_bus_ops;
} else if (dev->path.type == DEVICE_PATH_MMIO) { break;
case DEVICE_PATH_MMIO:
set_mmio_dev_ops(dev); set_mmio_dev_ops(dev);
break;
default:
break;
} }
} }