Deleted Added
full compact
als4000.c (274035) als4000.c (296135)
1/*-
2 * Copyright (c) 2001 Orion Hodson <oho@acm.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 32 unchanged lines hidden (view full) ---

41#include <dev/sound/isa/sb.h>
42#include <dev/sound/pci/als4000.h>
43
44#include <dev/pci/pcireg.h>
45#include <dev/pci/pcivar.h>
46
47#include "mixer_if.h"
48
1/*-
2 * Copyright (c) 2001 Orion Hodson <oho@acm.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 32 unchanged lines hidden (view full) ---

41#include <dev/sound/isa/sb.h>
42#include <dev/sound/pci/als4000.h>
43
44#include <dev/pci/pcireg.h>
45#include <dev/pci/pcivar.h>
46
47#include "mixer_if.h"
48
49SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/als4000.c 274035 2014-11-03 11:11:45Z bapt $");
49SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/als4000.c 296135 2016-02-27 03:34:01Z jhibbits $");
50
51/* Debugging macro's */
52#undef DEB
53#ifndef DEB
54#define DEB(x) /* x */
55#endif /* DEB */
56
57#define ALS_DEFAULT_BUFSZ 16384

--- 697 unchanged lines hidden (view full) ---

755 sc->lock = NULL;
756 }
757}
758
759static int
760als_resource_grab(device_t dev, struct sc_info *sc)
761{
762 sc->regid = PCIR_BAR(0);
50
51/* Debugging macro's */
52#undef DEB
53#ifndef DEB
54#define DEB(x) /* x */
55#endif /* DEB */
56
57#define ALS_DEFAULT_BUFSZ 16384

--- 697 unchanged lines hidden (view full) ---

755 sc->lock = NULL;
756 }
757}
758
759static int
760als_resource_grab(device_t dev, struct sc_info *sc)
761{
762 sc->regid = PCIR_BAR(0);
763 sc->reg = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->regid, 0, ~0,
764 ALS_CONFIG_SPACE_BYTES, RF_ACTIVE);
763 sc->reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &sc->regid,
764 RF_ACTIVE);
765 if (sc->reg == 0) {
766 device_printf(dev, "unable to allocate register space\n");
767 goto bad;
768 }
769 sc->st = rman_get_bustag(sc->reg);
770 sc->sh = rman_get_bushandle(sc->reg);
771
772 sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,

--- 169 unchanged lines hidden ---
765 if (sc->reg == 0) {
766 device_printf(dev, "unable to allocate register space\n");
767 goto bad;
768 }
769 sc->st = rman_get_bustag(sc->reg);
770 sc->sh = rman_get_bushandle(sc->reg);
771
772 sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid,

--- 169 unchanged lines hidden ---