Clean up whitespace in the example code to be style(9), esp. with regards

to indentation in the functions.
This commit is contained in:
John Baldwin 2003-12-31 18:32:36 +00:00
parent dff04d611f
commit 35704cd4a6
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=19412

View file

@ -70,16 +70,16 @@ mypci_open(dev_t dev, int oflags, int devtype, d_thread_t *td)
int err = 0;
printf("Opened device \"mypci\" successfully.\n");
return(err);
return (err);
}
int
mypci_close(dev_t dev, int fflag, int devtype, struct d_thread_t *td)
{
int err=0;
int err = 0;
printf("Closing device \"mypci.\"\n");
return(err);
return (err);
}
int
@ -88,7 +88,7 @@ mypci_read(dev_t dev, struct uio *uio, int ioflag)
int err = 0;
printf("mypci read!\n");
return err;
return (err);
}
int
@ -97,7 +97,7 @@ mypci_write(dev_t dev, struct uio *uio, int ioflag)
int err = 0;
printf("mypci write!\n");
return(err);
return (err);
}
/* PCI Support Functions */
@ -113,10 +113,9 @@ mypci_probe(device_t dev)
if (pci_get_vendor(dev) == 0x11c1) {
printf("We've got the Winmodem, probe successful!\n");
return 0;
return (0);
}
return ENXIO;
return (ENXIO);
}
/* Attach function is only called if the probe is successful */
@ -124,11 +123,12 @@ mypci_probe(device_t dev)
static int
mypci_attach(device_t dev)
{
printf("MyPCI Attach for : deviceID : 0x%x\n",pci_get_vendor(dev));
sdev = make_dev(<literal>&</literal>mypci_cdevsw, 0, UID_ROOT, GID_WHEEL,
0600, "mypci");
sdev = make_dev(<literal>&</literal>mypci_cdevsw, 0, UID_ROOT,
GID_WHEEL, 0600, "mypci");
printf("Mypci device loaded.\n");
return ENXIO;
return (ENXIO);
}
/* Detach device. */
@ -136,8 +136,9 @@ mypci_attach(device_t dev)
static int
mypci_detach(device_t dev)
{
printf("Mypci detach!\n");
return 0;
return (0);
}
/* Called during system shutdown after sync. */
@ -145,8 +146,9 @@ mypci_detach(device_t dev)
static int
mypci_shutdown(device_t dev)
{
printf("Mypci shutdown!\n");
return 0;
return (0);
}
/*
@ -155,8 +157,9 @@ mypci_shutdown(device_t dev)
static int
mypci_suspend(device_t dev)
{
printf("Mypci suspend!\n");
return 0;
return (0);
}
/*
@ -166,8 +169,9 @@ mypci_suspend(device_t dev)
static int
mypci_resume(device_t dev)
{
printf("Mypci resume!\n");
return 0;
return (0);
}
static device_method_t mypci_methods[] = {