Cosmetics:

. staticize out_fdc(), there's no longer an ft(4) driver sharing its use
. remove in_fdc(), has been used by ft(4) last time, long since obsoleted
  by fd_in()
. move the declaration of fd_clone() to where most of the other function
  declarations are
. de-__P()ify fd_clone(), it's been the only _P()ed function in the
  entire file
This commit is contained in:
Joerg Wunsch 2001-06-20 20:21:55 +00:00
parent bfe01aa7f2
commit 80909a7db8
2 changed files with 6 additions and 66 deletions

View File

@ -188,10 +188,6 @@ static devclass_t fd_devclass;
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
\***********************************************************************/
/* needed for ft driver, thus exported */
int in_fdc(struct fdc_data *);
int out_fdc(struct fdc_data *, int);
/* internal functions */
static void fdc_intr(void *);
static void set_motor(struct fdc_data *, int, int);
@ -202,6 +198,7 @@ static timeout_t fd_motor_on;
static void fd_turnon(struct fd_data *);
static void fdc_reset(fdc_p);
static int fd_in(struct fdc_data *, int *);
static int out_fdc(struct fdc_data *, int);
static void fdstart(struct fdc_data *);
static timeout_t fd_iotimeout;
static timeout_t fd_pseudointr;
@ -210,6 +207,7 @@ static int retrier(struct fdc_data *);
static int fdformat(dev_t, struct fd_formb *, struct proc *);
static int enable_fifo(fdc_p fdc);
static void fd_clone (void *arg, char *name, int namelen, dev_t *dev);
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
@ -929,8 +927,6 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
#endif /* NCARD > 0 */
static void fd_clone __P((void *arg, char *name, int namelen, dev_t *dev));
static struct {
char *match;
int minor;
@ -957,11 +953,7 @@ static struct {
{ 0, 0 }
};
static void
fd_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
dev_t *dev;
fd_clone (void *arg, char *name, int namelen, dev_t *dev)
{
int u, d, i;
char *n;
@ -1318,28 +1310,6 @@ fdc_reset(fdc_p fdc)
/****************************************************************************/
/* fdc in/out */
/****************************************************************************/
int
in_fdc(struct fdc_data *fdc)
{
int i, j = 100000;
while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM))
!= (NE7_DIO|NE7_RQM) && j-- > 0)
if (i == NE7_RQM)
return fdc_err(fdc, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdc, bootverbose? "input ready timeout\n": 0);
#ifdef FDC_DEBUG
i = fddata_rd(fdc);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
return(i);
#else /* !FDC_DEBUG */
return fddata_rd(fdc);
#endif /* FDC_DEBUG */
}
/*
* fd_in: Like in_fdc, but allows you to see if it worked.
*/
static int
fd_in(struct fdc_data *fdc, int *ptr)
{

View File

@ -188,10 +188,6 @@ static devclass_t fd_devclass;
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
\***********************************************************************/
/* needed for ft driver, thus exported */
int in_fdc(struct fdc_data *);
int out_fdc(struct fdc_data *, int);
/* internal functions */
static void fdc_intr(void *);
static void set_motor(struct fdc_data *, int, int);
@ -202,6 +198,7 @@ static timeout_t fd_motor_on;
static void fd_turnon(struct fd_data *);
static void fdc_reset(fdc_p);
static int fd_in(struct fdc_data *, int *);
static int out_fdc(struct fdc_data *, int);
static void fdstart(struct fdc_data *);
static timeout_t fd_iotimeout;
static timeout_t fd_pseudointr;
@ -210,6 +207,7 @@ static int retrier(struct fdc_data *);
static int fdformat(dev_t, struct fd_formb *, struct proc *);
static int enable_fifo(fdc_p fdc);
static void fd_clone (void *arg, char *name, int namelen, dev_t *dev);
static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */
@ -929,8 +927,6 @@ DRIVER_MODULE(fdc, pccard, fdc_pccard_driver, fdc_devclass, 0, 0);
#endif /* NCARD > 0 */
static void fd_clone __P((void *arg, char *name, int namelen, dev_t *dev));
static struct {
char *match;
int minor;
@ -957,11 +953,7 @@ static struct {
{ 0, 0 }
};
static void
fd_clone(arg, name, namelen, dev)
void *arg;
char *name;
int namelen;
dev_t *dev;
fd_clone (void *arg, char *name, int namelen, dev_t *dev)
{
int u, d, i;
char *n;
@ -1318,28 +1310,6 @@ fdc_reset(fdc_p fdc)
/****************************************************************************/
/* fdc in/out */
/****************************************************************************/
int
in_fdc(struct fdc_data *fdc)
{
int i, j = 100000;
while ((i = fdsts_rd(fdc) & (NE7_DIO|NE7_RQM))
!= (NE7_DIO|NE7_RQM) && j-- > 0)
if (i == NE7_RQM)
return fdc_err(fdc, "ready for output in input\n");
if (j <= 0)
return fdc_err(fdc, bootverbose? "input ready timeout\n": 0);
#ifdef FDC_DEBUG
i = fddata_rd(fdc);
TRACE1("[FDDATA->0x%x]", (unsigned char)i);
return(i);
#else /* !FDC_DEBUG */
return fddata_rd(fdc);
#endif /* FDC_DEBUG */
}
/*
* fd_in: Like in_fdc, but allows you to see if it worked.
*/
static int
fd_in(struct fdc_data *fdc, int *ptr)
{