Clean up whitespace in the example code to be style(9), esp. with regards
to indentation in the functions.
This commit is contained in:
parent
dff04d611f
commit
35704cd4a6
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=19412
1 changed files with 42 additions and 38 deletions
|
@ -88,7 +88,7 @@ mypci_read(dev_t dev, struct uio *uio, int ioflag)
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
printf("mypci read!\n");
|
printf("mypci read!\n");
|
||||||
return err;
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -113,10 +113,9 @@ mypci_probe(device_t dev)
|
||||||
|
|
||||||
if (pci_get_vendor(dev) == 0x11c1) {
|
if (pci_get_vendor(dev) == 0x11c1) {
|
||||||
printf("We've got the Winmodem, probe successful!\n");
|
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 */
|
/* Attach function is only called if the probe is successful */
|
||||||
|
@ -124,11 +123,12 @@ mypci_probe(device_t dev)
|
||||||
static int
|
static int
|
||||||
mypci_attach(device_t dev)
|
mypci_attach(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("MyPCI Attach for : deviceID : 0x%x\n",pci_get_vendor(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,
|
sdev = make_dev(<literal>&</literal>mypci_cdevsw, 0, UID_ROOT,
|
||||||
0600, "mypci");
|
GID_WHEEL, 0600, "mypci");
|
||||||
printf("Mypci device loaded.\n");
|
printf("Mypci device loaded.\n");
|
||||||
return ENXIO;
|
return (ENXIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Detach device. */
|
/* Detach device. */
|
||||||
|
@ -136,8 +136,9 @@ mypci_attach(device_t dev)
|
||||||
static int
|
static int
|
||||||
mypci_detach(device_t dev)
|
mypci_detach(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Mypci detach!\n");
|
printf("Mypci detach!\n");
|
||||||
return 0;
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called during system shutdown after sync. */
|
/* Called during system shutdown after sync. */
|
||||||
|
@ -145,8 +146,9 @@ mypci_detach(device_t dev)
|
||||||
static int
|
static int
|
||||||
mypci_shutdown(device_t dev)
|
mypci_shutdown(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Mypci shutdown!\n");
|
printf("Mypci shutdown!\n");
|
||||||
return 0;
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -155,8 +157,9 @@ mypci_shutdown(device_t dev)
|
||||||
static int
|
static int
|
||||||
mypci_suspend(device_t dev)
|
mypci_suspend(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Mypci suspend!\n");
|
printf("Mypci suspend!\n");
|
||||||
return 0;
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -166,8 +169,9 @@ mypci_suspend(device_t dev)
|
||||||
static int
|
static int
|
||||||
mypci_resume(device_t dev)
|
mypci_resume(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf("Mypci resume!\n");
|
printf("Mypci resume!\n");
|
||||||
return 0;
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static device_method_t mypci_methods[] = {
|
static device_method_t mypci_methods[] = {
|
||||||
|
|
Loading…
Reference in a new issue