[coreboot-gerrit] Change in coreboot[master]: Code clean up for Stoney Ridge hda/sata/usb

Richard Spiegel (Code Review) gerrit at coreboot.org
Tue Sep 12 19:04:01 CEST 2017


Richard Spiegel has uploaded this change for review. ( https://review.coreboot.org/21522


Change subject: Code clean up for Stoney Ridge hda/sata/usb
......................................................................

Code clean up for Stoney Ridge hda/sata/usb

Removed empty functions. On function pointer structure "device_operations",
replaced the 0 equality by NULL equality.

Change-Id: I9f8dc7681ab2e651872e69a8b2e990e59ebe80c9
Signed-off-by: Richard Spiegel <richard.spiegel at amd.corp-partner.google.com>
---
M src/soc/amd/stoneyridge/hda.c
M src/soc/amd/stoneyridge/sata.c
M src/soc/amd/stoneyridge/usb.c
3 files changed, 5 insertions(+), 13 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/21522/1

diff --git a/src/soc/amd/stoneyridge/hda.c b/src/soc/amd/stoneyridge/hda.c
index b41b999..1774a4a 100644
--- a/src/soc/amd/stoneyridge/hda.c
+++ b/src/soc/amd/stoneyridge/hda.c
@@ -28,10 +28,6 @@
 	0
 };
 
-static void hda_init(struct device *dev)
-{
-}
-
 static struct pci_operations lops_pci = {
 	.set_subsystem = pci_dev_set_subsystem,
 };
@@ -40,8 +36,8 @@
 	.read_resources = pci_dev_read_resources,
 	.set_resources = pci_dev_set_resources,
 	.enable_resources = pci_dev_enable_resources,
-	.init = hda_init,
-	.scan_bus = 0,
+	.init = NULL,
+	.scan_bus = NULL,
 	.ops_pci = &lops_pci,
 };
 
diff --git a/src/soc/amd/stoneyridge/sata.c b/src/soc/amd/stoneyridge/sata.c
index e2de3e6..c1e5493 100644
--- a/src/soc/amd/stoneyridge/sata.c
+++ b/src/soc/amd/stoneyridge/sata.c
@@ -63,7 +63,7 @@
 	.set_resources = pci_dev_set_resources,
 	.enable_resources = pci_dev_enable_resources,
 	.init = sata_init,
-	.scan_bus = 0,
+	.scan_bus = NULL,
 	.ops_pci = &lops_pci,
 };
 
diff --git a/src/soc/amd/stoneyridge/usb.c b/src/soc/amd/stoneyridge/usb.c
index c1caf7d..82984b9 100644
--- a/src/soc/amd/stoneyridge/usb.c
+++ b/src/soc/amd/stoneyridge/usb.c
@@ -26,16 +26,12 @@
 	.set_subsystem = pci_dev_set_subsystem,
 };
 
-static void usb_init(struct device *dev)
-{
-}
-
 static struct device_operations usb_ops = {
 	.read_resources = pci_ehci_read_resources,
 	.set_resources = pci_dev_set_resources,
 	.enable_resources = pci_dev_enable_resources,
-	.init = usb_init,
-	.scan_bus = 0,
+	.init = NULL,
+	.scan_bus = NULL,
 	.ops_pci = &lops_pci,
 };
 

-- 
To view, visit https://review.coreboot.org/21522
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f8dc7681ab2e651872e69a8b2e990e59ebe80c9
Gerrit-Change-Number: 21522
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Spiegel <richard.spiegel at silverbackltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170912/4cbe6e4a/attachment.html>


More information about the coreboot-gerrit mailing list