snd_hda: whitespace and style(9) cleanups

This commit is contained in:
emaste 2020-04-19 17:53:44 +00:00
parent b43aed33d6
commit d25151bcd2
2 changed files with 16 additions and 23 deletions

View File

@ -360,8 +360,7 @@ hdac_poll_callback(void *arg)
hdac_unlock(sc);
return;
}
callout_reset(&sc->poll_callout, sc->poll_ival,
hdac_poll_callback, sc);
callout_reset(&sc->poll_callout, sc->poll_ival, hdac_poll_callback, sc);
hdac_unlock(sc);
hdac_intr_handler(sc);
@ -412,7 +411,7 @@ hdac_reset(struct hdac_softc *sc, int wakeup)
if (!(gctl & HDAC_GCTL_CRST))
break;
DELAY(10);
} while (--count);
} while (--count);
if (gctl & HDAC_GCTL_CRST) {
device_printf(sc->dev, "Unable to put hdac in reset\n");
return (ENXIO);
@ -446,7 +445,6 @@ hdac_reset(struct hdac_softc *sc, int wakeup)
return (0);
}
/****************************************************************************
* int hdac_get_capabilities(struct hdac_softc *);
*
@ -620,11 +618,10 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma *dma, bus_size_t size)
return (result);
}
/****************************************************************************
* void hdac_dma_free(struct hdac_softc *, struct hdac_dma *)
*
* Free a struct dhac_dma that has been previously allocated via the
* Free a struct hdac_dma that has been previously allocated via the
* hdac_dma_alloc function.
****************************************************************************/
static void
@ -1041,8 +1038,7 @@ hdac_probe(device_t dev)
if (HDA_DEV_MATCH(hdac_devices[i].model, model) &&
class == PCIC_MULTIMEDIA &&
subclass == PCIS_MULTIMEDIA_HDA) {
snprintf(desc, sizeof(desc),
"%s (0x%04x)",
snprintf(desc, sizeof(desc), "%s (0x%04x)",
hdac_devices[i].desc, pci_get_device(dev));
result = BUS_PROBE_GENERIC;
break;
@ -1700,20 +1696,17 @@ hdac_print_child(device_t dev, device_t child)
int retval;
retval = bus_print_child_header(dev, child);
retval += printf(" at cad %d",
(int)(intptr_t)device_get_ivars(child));
retval += printf(" at cad %d", (int)(intptr_t)device_get_ivars(child));
retval += bus_print_child_footer(dev, child);
return (retval);
}
static int
hdac_child_location_str(device_t dev, device_t child, char *buf,
size_t buflen)
hdac_child_location_str(device_t dev, device_t child, char *buf, size_t buflen)
{
snprintf(buf, buflen, "cad=%d",
(int)(intptr_t)device_get_ivars(child));
snprintf(buf, buflen, "cad=%d", (int)(intptr_t)device_get_ivars(child));
return (0);
}
@ -1724,8 +1717,8 @@ hdac_child_pnpinfo_str_method(device_t dev, device_t child, char *buf,
struct hdac_softc *sc = device_get_softc(dev);
nid_t cad = (uintptr_t)device_get_ivars(child);
snprintf(buf, buflen, "vendor=0x%04x device=0x%04x revision=0x%02x "
"stepping=0x%02x",
snprintf(buf, buflen,
"vendor=0x%04x device=0x%04x revision=0x%02x stepping=0x%02x",
sc->codecs[cad].vendor_id, sc->codecs[cad].device_id,
sc->codecs[cad].revision_id, sc->codecs[cad].stepping_id);
return (0);
@ -1901,8 +1894,8 @@ hdac_stream_free(device_t dev, device_t child, int dir, int stream)
}
static int
hdac_stream_start(device_t dev, device_t child,
int dir, int stream, bus_addr_t buf, int blksz, int blkcnt)
hdac_stream_start(device_t dev, device_t child, int dir, int stream,
bus_addr_t buf, int blksz, int blkcnt)
{
struct hdac_softc *sc = device_get_softc(dev);
struct hdac_bdle *bdle;

View File

@ -434,7 +434,8 @@ hdacc_probe(device_t dev)
int i;
id = ((uint32_t)hda_get_vendor_id(dev) << 16) + hda_get_device_id(dev);
revid = ((uint32_t)hda_get_revision_id(dev) << 8) + hda_get_stepping_id(dev);
revid = ((uint32_t)hda_get_revision_id(dev) << 8) +
hda_get_stepping_id(dev);
for (i = 0; i < nitems(hdacc_codecs); i++) {
if (!HDA_DEV_MATCH(hdacc_codecs[i].id, id))
@ -525,8 +526,7 @@ hdacc_detach(device_t dev)
}
static int
hdacc_child_location_str(device_t dev, device_t child, char *buf,
size_t buflen)
hdacc_child_location_str(device_t dev, device_t child, char *buf, size_t buflen)
{
struct hdacc_fg *fg = device_get_ivars(child);
@ -645,8 +645,8 @@ hdacc_stream_free(device_t dev, device_t child, int dir, int stream)
}
static int
hdacc_stream_start(device_t dev, device_t child,
int dir, int stream, bus_addr_t buf, int blksz, int blkcnt)
hdacc_stream_start(device_t dev, device_t child, int dir, int stream,
bus_addr_t buf, int blksz, int blkcnt)
{
return (HDAC_STREAM_START(device_get_parent(dev), dev,