Attempt at making this use DEVFS properly. (Now it should at least work.)

This commit is contained in:
Eivind Eklund 1998-01-31 05:23:49 +00:00
parent e0d781f3a5
commit 2166d84372
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32926
4 changed files with 12 additions and 6 deletions

View File

@ -859,8 +859,10 @@ bktr_attach( ATTACH_ARGS )
probeCard( bktr, TRUE );
#ifdef DEVFS
bktr->devfs_token = devfs_add_devswf(&bktr_cdevsw, unit,
DV_CHR, 0, 0, 0644, "brooktree");
bktr->devfs_bktr_token = devfs_add_devswf(&bktr_cdevsw, unit,
DV_CHR, 0, 0, 0444, "bktr%d", unit);
bktr->devfs_tuner_token = devfs_add_devswf(&bktr_cdevsw, unit+16,
DV_CHR, 0, 0, 0444, "tuner%d", unit);
#endif /* DEVFS */
fun = pci_conf_read(tag, PCI_COMMAND_STATUS_REG);
pci_conf_write(tag, PCI_COMMAND_STATUS_REG, fun | 4);

View File

@ -429,7 +429,8 @@ struct bktr_softc {
#define TUNER_OPEN 0x00000002
u_short fps; /* frames per second */
#ifdef DEVFS
void *devfs_token;
void *devfs_bktr_token;
void *devfs_tuner_token;
#endif
struct meteor_video video;
struct TVTUNER tuner;

View File

@ -429,7 +429,8 @@ struct bktr_softc {
#define TUNER_OPEN 0x00000002
u_short fps; /* frames per second */
#ifdef DEVFS
void *devfs_token;
void *devfs_bktr_token;
void *devfs_tuner_token;
#endif
struct meteor_video video;
struct TVTUNER tuner;

View File

@ -859,8 +859,10 @@ bktr_attach( ATTACH_ARGS )
probeCard( bktr, TRUE );
#ifdef DEVFS
bktr->devfs_token = devfs_add_devswf(&bktr_cdevsw, unit,
DV_CHR, 0, 0, 0644, "brooktree");
bktr->devfs_bktr_token = devfs_add_devswf(&bktr_cdevsw, unit,
DV_CHR, 0, 0, 0444, "bktr%d", unit);
bktr->devfs_tuner_token = devfs_add_devswf(&bktr_cdevsw, unit+16,
DV_CHR, 0, 0, 0444, "tuner%d", unit);
#endif /* DEVFS */
fun = pci_conf_read(tag, PCI_COMMAND_STATUS_REG);
pci_conf_write(tag, PCI_COMMAND_STATUS_REG, fun | 4);