aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2001-07-30 07:17:40 +0000
committerWarner Losh <imp@FreeBSD.org>2001-07-30 07:17:40 +0000
commit7e766053f8a5c8da6f7244665f79b63448ed89d0 (patch)
tree2eacd77ab2a85d13d1a057af3a9638133d6c676e /sys/pccard
parentf5b72dbe84133973203be46ee5393cc25294930b (diff)
downloadsrc-7e766053f8a5c8da6f7244665f79b63448ed89d0.tar.gz
src-7e766053f8a5c8da6f7244665f79b63448ed89d0.zip
Don't use a buffer for the state info from the TI chips. Just print
it directly. Also, minor style(9) nits near one or two of these sites.
Notes
Notes: svn path=/head/; revision=80599
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pcic_pci.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 0fd39ac5a2eb..e4f390dbdd14 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -231,7 +231,6 @@ pcic_pci_ti_init(device_t dev)
{
u_long syscntl,devcntl,cardcntl;
u_int32_t device_id = pci_get_devid(dev);
- char buf[128];
struct pcic_softc *sc = device_get_softc(dev);
int ti113x = (device_id == PCI_DEVICE_ID_PCIC_TI1031) ||
(device_id == PCI_DEVICE_ID_PCIC_TI1130) ||
@@ -243,10 +242,10 @@ pcic_pci_ti_init(device_t dev)
switch(ti113x){
case 0 :
- strcpy(buf, "TI12XX PCI Config Reg: ");
+ device_printf(dev, "TI12XX PCI Config Reg: ");
break;
case 1 :
- strcpy(buf, "TI113X PCI Config Reg: ");
+ device_printf(dev, "TI113X PCI Config Reg: ");
/*
* Default card control register setting is
* PCI interrupt. The method of this code
@@ -268,9 +267,9 @@ pcic_pci_ti_init(device_t dev)
cardcntl = pci_read_config(dev, TI113X_PCI_CARD_CONTROL, 1);
if (syscntl & TI113X_SYSCNTL_CLKRUN_ENA) {
if (syscntl & TI113X_SYSCNTL_CLKRUN_SEL)
- strcat(buf, "[clkrun irq 12]");
+ printf("[clkrun irq 12]");
else
- strcat(buf, "[clkrun irq 10]");
+ printf("[clkrun irq 10]");
}
break;
}
@@ -283,26 +282,26 @@ pcic_pci_ti_init(device_t dev)
pci_write_config(dev, TI113X_PCI_SYSTEM_CONTROL, syscntl, 1);
}
if (cardcntl & TI113X_CARDCNTL_RING_ENA)
- strcat(buf, "[ring enable]");
+ printf("[ring enable]");
if (cardcntl & TI113X_CARDCNTL_SPKR_ENA)
- strcat(buf, "[speaker enable]");
+ printf("[speaker enable]");
if (syscntl & TI113X_SYSCNTL_PWRSAVINGS)
- strcat(buf, "[pwr save]");
- switch(devcntl & TI113X_DEVCNTL_INTR_MASK){
+ printf("[pwr save]");
+ switch (devcntl & TI113X_DEVCNTL_INTR_MASK) {
case TI113X_DEVCNTL_INTR_ISA :
- strcat(buf, "[CSC parallel isa irq]");
+ printf("[CSC parallel isa irq]");
break;
case TI113X_DEVCNTL_INTR_SERIAL :
- strcat(buf, "[CSC serial isa irq]");
+ printf("[CSC serial isa irq]");
break;
case TI113X_DEVCNTL_INTR_NONE :
- strcat(buf, "[pci only]");
+ printf("[pci only]");
break;
case TI12XX_DEVCNTL_INTR_ALLSERIAL :
- strcat(buf, "[FUNC pci int + CSC serial isa irq]");
+ printf("[FUNC pci int + CSC serial isa irq]");
break;
}
- device_printf(dev, "%s\n",buf);
+ printf("\n");
}
static void