diff options
Diffstat (limited to 'sys/dev/ahci')
-rw-r--r-- | sys/dev/ahci/ahci.c | 6 | ||||
-rw-r--r-- | sys/dev/ahci/ahci.h | 3 | ||||
-rw-r--r-- | sys/dev/ahci/ahci_fsl_fdt.c | 2 | ||||
-rw-r--r-- | sys/dev/ahci/ahci_generic.c | 4 | ||||
-rw-r--r-- | sys/dev/ahci/ahci_mv_fdt.c | 2 | ||||
-rw-r--r-- | sys/dev/ahci/ahci_pci.c | 4 |
6 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 8991d9c23fbc..47a5ef455f82 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/lock.h> #include <sys/mutex.h> +#include <sys/sbuf.h> #include <sys/sysctl.h> #include <machine/stdarg.h> #include <machine/resource.h> @@ -697,14 +698,13 @@ ahci_print_child(device_t dev, device_t child) } int -ahci_child_location_str(device_t dev, device_t child, char *buf, - size_t buflen) +ahci_child_location(device_t dev, device_t child, struct sbuf *sb) { intptr_t ivars; ivars = (intptr_t)device_get_ivars(child); if ((ivars & AHCI_EM_UNIT) == 0) - snprintf(buf, buflen, "channel=%d", (int)ivars & AHCI_UNIT); + sbuf_printf(sb, "channel=%d", (int)ivars & AHCI_UNIT); return (0); } diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 472f9845117d..f1d5b18806b3 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -663,8 +663,7 @@ int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, void *argument, void **cookiep); int ahci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); -int ahci_child_location_str(device_t dev, device_t child, char *buf, - size_t buflen); +int ahci_child_location(device_t dev, device_t child, struct sbuf *sb); bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t child); int ahci_ctlr_reset(device_t dev); int ahci_ctlr_setup(device_t dev); diff --git a/sys/dev/ahci/ahci_fsl_fdt.c b/sys/dev/ahci/ahci_fsl_fdt.c index f7491ee9768c..0fda9c28294b 100644 --- a/sys/dev/ahci/ahci_fsl_fdt.c +++ b/sys/dev/ahci/ahci_fsl_fdt.c @@ -406,7 +406,7 @@ static const device_method_t ahci_fsl_fdt_methods[] = { DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr, ahci_teardown_intr), DEVMETHOD(bus_print_child, ahci_print_child), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; diff --git a/sys/dev/ahci/ahci_generic.c b/sys/dev/ahci/ahci_generic.c index 79130e9e9e57..108aaa2adf3a 100644 --- a/sys/dev/ahci/ahci_generic.c +++ b/sys/dev/ahci/ahci_generic.c @@ -182,7 +182,7 @@ static device_method_t ahci_fdt_methods[] = { DEVMETHOD(bus_release_resource, ahci_release_resource), DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; @@ -206,7 +206,7 @@ static device_method_t ahci_acpi_methods[] = { DEVMETHOD(bus_release_resource, ahci_release_resource), DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; diff --git a/sys/dev/ahci/ahci_mv_fdt.c b/sys/dev/ahci/ahci_mv_fdt.c index b88ff2713587..ee08093482c5 100644 --- a/sys/dev/ahci/ahci_mv_fdt.c +++ b/sys/dev/ahci/ahci_mv_fdt.c @@ -140,7 +140,7 @@ static device_method_t ahci_methods[] = { DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr, ahci_teardown_intr), DEVMETHOD(bus_print_child, ahci_print_child), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index ccc107a14bc8..b60119f3ab64 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -740,7 +740,7 @@ static device_method_t ahci_methods[] = { DEVMETHOD(bus_release_resource, ahci_release_resource), DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), DEVMETHOD_END }; @@ -764,7 +764,7 @@ static device_method_t ahci_ata_methods[] = { DEVMETHOD(bus_release_resource, ahci_release_resource), DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), + DEVMETHOD(bus_child_location, ahci_child_location), DEVMETHOD_END }; static driver_t ahci_ata_driver = { |