diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-17 20:09:37 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-17 20:09:37 -0700 |
| commit | 5afffee261d133e7fe75e00a1ddd779712f17aac (patch) | |
| tree | 9eb4d1374a8882850408475f4b26ee3c666a23bb /drivers/char | |
| parent | de6639d22049433f7f5d056209bae39ec8005d19 (diff) | |
| parent | 6823c0fe886f4c095ae05a79d4204e76395d016a (diff) | |
Merge
Diffstat (limited to 'drivers/char')
| -rw-r--r-- | drivers/char/Config.help | 87 | ||||
| -rw-r--r-- | drivers/char/drm/sis_ds.c | 22 | ||||
| -rw-r--r-- | drivers/char/ftape/lowlevel/ftape-rw.h | 2 | ||||
| -rw-r--r-- | drivers/char/ftape/zftape/zftape-vtbl.h | 16 | ||||
| -rw-r--r-- | drivers/char/isicom.c | 10 | ||||
| -rw-r--r-- | drivers/char/specialix.c | 48 |
6 files changed, 50 insertions, 135 deletions
diff --git a/drivers/char/Config.help b/drivers/char/Config.help index b03cd9da93b0..34e204aca958 100644 --- a/drivers/char/Config.help +++ b/drivers/char/Config.help @@ -40,93 +40,6 @@ CONFIG_MWAVE The module will be called mwave.o. If you want to compile it as a module, say M here and read Documentation/modules.txt. -CONFIG_AGP - AGP (Accelerated Graphics Port) is a bus system mainly used to - connect graphics cards to the rest of the system. - - If you have an AGP system and you say Y here, it will be possible to - use the AGP features of your 3D rendering video card. This code acts - as a sort of "AGP driver" for the motherboard's chipset. - - If you need more texture memory than you can get with the AGP GART - (theoretically up to 256 MB, but in practice usually 64 or 128 MB - due to kernel allocation issues), you could use PCI accesses - and have up to a couple gigs of texture space. - - Note that this is the only means to have XFree4/GLX use - write-combining with MTRR support on the AGP bus. Without it, OpenGL - direct rendering will be a lot slower but still faster than PIO. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - - This driver is available as a module. If you want to compile it as - a module, say M here and read <file:Documentation/modules.txt>. The - module will be called agpgart.o. - -CONFIG_AGP_INTEL - This option gives you AGP support for the GLX component of the - XFree86 4.x on Intel 440LX/BX/GX, 815, 820, 830, 840, 845, 850 and 860 chipsets. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - -CONFIG_AGP_I810 - This option gives you AGP support for the Xserver on the Intel 810 - 815 and 830m chipset boards for their on-board integrated graphics. This - is required to do any useful video modes with these boards. - -CONFIG_AGP_I460 - This option gives you AGP GART support for the Intel 460GX chipset - for IA64 processors. - -CONFIG_AGP_VIA - This option gives you AGP support for the GLX component of the - XFree86 4.x on VIA MPV3/Apollo Pro chipsets. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - -CONFIG_AGP_AMD - This option gives you AGP support for the GLX component of the - XFree86 4.x on AMD Irongate, 761, and 762 chipsets. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - -CONFIG_AGP_SIS - This option gives you AGP support for the GLX component of the "soon - to be released" XFree86 4.x on Silicon Integrated Systems [SiS] - chipsets. - - Note that 5591/5592 AGP chipsets are NOT supported. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - -CONFIG_AGP_SWORKS - Say Y here to support the Serverworks AGP card. See - <http://www.serverworks.com/> for product descriptions and images. - -CONFIG_AGP_ALI - This option gives you AGP support for the GLX component of the - XFree86 4.x on the following ALi chipsets. The supported chipsets - include M1541, M1621, M1631, M1632, M1641,M1647,and M1651. - For the ALi-chipset question, ALi suggests you refer to - <http://www.ali.com.tw/eng/support/index.shtml>. - - The M1541 chipset can do AGP 1x and 2x, but note that there is an - acknowledged incompatibility with Matrox G200 cards. Due to - timing issues, this chipset cannot do AGP 2x with the G200. - This is a hardware limitation. AGP 1x seems to be fine, though. - - You should say Y here if you use XFree86 3.3.6 or 4.x and want to - use GLX or DRI. If unsure, say N. - -CONFIG_AGP_HP_ZX1 - This option gives you AGP GART support for the HP ZX1 chipset - for IA64 processors. - CONFIG_I810_TCO Hardware driver for the TCO timer built into the Intel i810 and i815 chipset family. The TCO (Total Cost of Ownership) timer is a diff --git a/drivers/char/drm/sis_ds.c b/drivers/char/drm/sis_ds.c index 95880a482d79..f55cf6ab41bc 100644 --- a/drivers/char/drm/sis_ds.c +++ b/drivers/char/drm/sis_ds.c @@ -50,15 +50,16 @@ set_t *setInit(void) set_t *set; set = (set_t *)MALLOC(sizeof(set_t)); - for(i = 0; i < SET_SIZE; i++){ - set->list[i].free_next = i+1; - set->list[i].alloc_next = -1; - } - set->list[SET_SIZE-1].free_next = -1; - set->free = 0; - set->alloc = -1; - set->trace = -1; - + if (set) { + for(i = 0; i < SET_SIZE; i++){ + set->list[i].free_next = i+1; + set->list[i].alloc_next = -1; + } + set->list[SET_SIZE-1].free_next = -1; + set->free = 0; + set->alloc = -1; + set->trace = -1; + } return set; } @@ -172,7 +173,8 @@ static void *calloc(size_t nmemb, size_t size) { void *addr; addr = kmalloc(nmemb*size, GFP_KERNEL); - memset(addr, 0, nmemb*size); + if (addr) + memset(addr, 0, nmemb*size); return addr; } #define free(n) kfree(n) diff --git a/drivers/char/ftape/lowlevel/ftape-rw.h b/drivers/char/ftape/lowlevel/ftape-rw.h index df2b8b0cd93c..f93d224413e0 100644 --- a/drivers/char/ftape/lowlevel/ftape-rw.h +++ b/drivers/char/ftape/lowlevel/ftape-rw.h @@ -71,7 +71,7 @@ typedef struct { /* Count nr of 1's in pattern. */ -extern inline int count_ones(unsigned long mask) +static inline int count_ones(unsigned long mask) { int bits; diff --git a/drivers/char/ftape/zftape/zftape-vtbl.h b/drivers/char/ftape/zftape/zftape-vtbl.h index 7248db11c9f5..63de244153ce 100644 --- a/drivers/char/ftape/zftape/zftape-vtbl.h +++ b/drivers/char/ftape/zftape/zftape-vtbl.h @@ -168,11 +168,11 @@ extern int zft_fake_volume_headers (eof_mark_union *eof_map, extern int zft_weof (unsigned int count, zft_position *pos); extern void zft_move_past_eof (zft_position *pos); -extern inline int zft_tape_at_eod (const zft_position *pos); -extern inline int zft_tape_at_lbot (const zft_position *pos); -extern inline void zft_position_before_eof (zft_position *pos, +static inline int zft_tape_at_eod (const zft_position *pos); +static inline int zft_tape_at_lbot (const zft_position *pos); +static inline void zft_position_before_eof (zft_position *pos, const zft_volinfo *volume); -extern inline __s64 zft_check_for_eof(const zft_volinfo *vtbl, +static inline __s64 zft_check_for_eof(const zft_volinfo *vtbl, const zft_position *pos); /* this function decrements the zft_seg_pos counter if we are right @@ -180,7 +180,7 @@ extern inline __s64 zft_check_for_eof(const zft_volinfo *vtbl, * need to position before the eof mark. NOTE: zft_tape_pos is not * changed */ -extern inline void zft_position_before_eof(zft_position *pos, +static inline void zft_position_before_eof(zft_position *pos, const zft_volinfo *volume) { TRACE_FUN(ft_t_flow); @@ -195,7 +195,7 @@ extern inline void zft_position_before_eof(zft_position *pos, /* Mmmh. Is the position at the end of the last volume, that is right * before the last EOF mark also logical an EOD condition? */ -extern inline int zft_tape_at_eod(const zft_position *pos) +static inline int zft_tape_at_eod(const zft_position *pos) { TRACE_FUN(ft_t_any); @@ -207,7 +207,7 @@ extern inline int zft_tape_at_eod(const zft_position *pos) } } -extern inline int zft_tape_at_lbot(const zft_position *pos) +static inline int zft_tape_at_lbot(const zft_position *pos) { if (zft_qic_mode) { return (pos->seg_pos <= zft_first_vtbl->start_seg && @@ -220,7 +220,7 @@ extern inline int zft_tape_at_lbot(const zft_position *pos) /* This one checks for EOF. return remaing space (may be negative) */ -extern inline __s64 zft_check_for_eof(const zft_volinfo *vtbl, +static inline __s64 zft_check_for_eof(const zft_volinfo *vtbl, const zft_position *pos) { return (__s64)(vtbl->size - pos->volume_pos); diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 713ed380c7b7..eb6f325bc19c 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -122,7 +122,7 @@ struct miscdevice isiloader_device = { }; -extern inline int WaitTillCardIsFree(unsigned short base) +static inline int WaitTillCardIsFree(unsigned short base) { unsigned long count=0; while( (!(inw(base+0xe) & 0x1)) && (count++ < 6000000)); @@ -358,7 +358,7 @@ static inline int isicom_paranoia_check(struct isi_port const * port, kdev_t dev return 0; } -extern inline void schedule_bh(struct isi_port * port) +static inline void schedule_bh(struct isi_port * port) { queue_task(&port->bh_tqueue, &tq_isicom); mark_bh(ISICOM_BH); @@ -823,7 +823,7 @@ static void isicom_config_port(struct isi_port * port) /* open et all */ -extern inline void isicom_setup_board(struct isi_board * bp) +static inline void isicom_setup_board(struct isi_board * bp) { int channel; struct isi_port * port; @@ -1091,7 +1091,7 @@ static int isicom_open(struct tty_struct * tty, struct file * filp) /* close et all */ -extern inline void isicom_shutdown_board(struct isi_board * bp) +static inline void isicom_shutdown_board(struct isi_board * bp) { int channel; struct isi_port * port; @@ -1353,7 +1353,7 @@ static int isicom_chars_in_buffer(struct tty_struct * tty) } /* ioctl et all */ -extern inline void isicom_send_break(struct isi_port * port, unsigned long length) +static inline void isicom_send_break(struct isi_port * port, unsigned long length) { struct isi_board * card = port->card; short wait = 10; diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index b4d46077daa8..c04abce4a6c3 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c @@ -239,28 +239,28 @@ static inline int sx_paranoia_check(struct specialix_port const * port, */ /* Get board number from pointer */ -extern inline int board_No (struct specialix_board * bp) +static inline int board_No (struct specialix_board * bp) { return bp - sx_board; } /* Get port number from pointer */ -extern inline int port_No (struct specialix_port const * port) +static inline int port_No (struct specialix_port const * port) { return SX_PORT(port - sx_port); } /* Get pointer to board from pointer to port */ -extern inline struct specialix_board * port_Board(struct specialix_port const * port) +static inline struct specialix_board * port_Board(struct specialix_port const * port) { return &sx_board[SX_BOARD(port - sx_port)]; } /* Input Byte from CL CD186x register */ -extern inline unsigned char sx_in(struct specialix_board * bp, unsigned short reg) +static inline unsigned char sx_in(struct specialix_board * bp, unsigned short reg) { bp->reg = reg | 0x80; outb (reg | 0x80, bp->base + SX_ADDR_REG); @@ -269,7 +269,7 @@ extern inline unsigned char sx_in(struct specialix_board * bp, unsigned short r /* Output Byte to CL CD186x register */ -extern inline void sx_out(struct specialix_board * bp, unsigned short reg, +static inline void sx_out(struct specialix_board * bp, unsigned short reg, unsigned char val) { bp->reg = reg | 0x80; @@ -279,7 +279,7 @@ extern inline void sx_out(struct specialix_board * bp, unsigned short reg, /* Input Byte from CL CD186x register */ -extern inline unsigned char sx_in_off(struct specialix_board * bp, unsigned short reg) +static inline unsigned char sx_in_off(struct specialix_board * bp, unsigned short reg) { bp->reg = reg; outb (reg, bp->base + SX_ADDR_REG); @@ -288,7 +288,7 @@ extern inline unsigned char sx_in_off(struct specialix_board * bp, unsigned sho /* Output Byte to CL CD186x register */ -extern inline void sx_out_off(struct specialix_board * bp, unsigned short reg, +static inline void sx_out_off(struct specialix_board * bp, unsigned short reg, unsigned char val) { bp->reg = reg; @@ -298,7 +298,7 @@ extern inline void sx_out_off(struct specialix_board * bp, unsigned short reg, /* Wait for Channel Command Register ready */ -extern inline void sx_wait_CCR(struct specialix_board * bp) +static inline void sx_wait_CCR(struct specialix_board * bp) { unsigned long delay; @@ -311,7 +311,7 @@ extern inline void sx_wait_CCR(struct specialix_board * bp) /* Wait for Channel Command Register ready */ -extern inline void sx_wait_CCR_off(struct specialix_board * bp) +static inline void sx_wait_CCR_off(struct specialix_board * bp) { unsigned long delay; @@ -327,13 +327,13 @@ extern inline void sx_wait_CCR_off(struct specialix_board * bp) * specialix IO8+ IO range functions. */ -extern inline int sx_check_io_range(struct specialix_board * bp) +static inline int sx_check_io_range(struct specialix_board * bp) { return check_region (bp->base, SX_IO_SPACE); } -extern inline void sx_request_io_range(struct specialix_board * bp) +static inline void sx_request_io_range(struct specialix_board * bp) { request_region(bp->base, bp->flags&SX_BOARD_IS_PCI?SX_PCI_IO_SPACE:SX_IO_SPACE, @@ -341,7 +341,7 @@ extern inline void sx_request_io_range(struct specialix_board * bp) } -extern inline void sx_release_io_range(struct specialix_board * bp) +static inline void sx_release_io_range(struct specialix_board * bp) { release_region(bp->base, bp->flags&SX_BOARD_IS_PCI?SX_PCI_IO_SPACE:SX_IO_SPACE); @@ -351,7 +351,7 @@ extern inline void sx_release_io_range(struct specialix_board * bp) /* Must be called with enabled interrupts */ /* Ugly. Very ugly. Don't use this for anything else than initialization code */ -extern inline void sx_long_delay(unsigned long delay) +static inline void sx_long_delay(unsigned long delay) { unsigned long i; @@ -599,7 +599,7 @@ static int sx_probe(struct specialix_board *bp) * Interrupt processing routines. * */ -extern inline void sx_mark_event(struct specialix_port * port, int event) +static inline void sx_mark_event(struct specialix_port * port, int event) { /* * I'm not quite happy with current scheme all serial @@ -616,7 +616,7 @@ extern inline void sx_mark_event(struct specialix_port * port, int event) } -extern inline struct specialix_port * sx_get_port(struct specialix_board * bp, +static inline struct specialix_port * sx_get_port(struct specialix_board * bp, unsigned char const * what) { unsigned char channel; @@ -635,7 +635,7 @@ extern inline struct specialix_port * sx_get_port(struct specialix_board * bp, } -extern inline void sx_receive_exc(struct specialix_board * bp) +static inline void sx_receive_exc(struct specialix_board * bp) { struct specialix_port *port; struct tty_struct *tty; @@ -701,7 +701,7 @@ extern inline void sx_receive_exc(struct specialix_board * bp) } -extern inline void sx_receive(struct specialix_board * bp) +static inline void sx_receive(struct specialix_board * bp) { struct specialix_port *port; struct tty_struct *tty; @@ -732,7 +732,7 @@ extern inline void sx_receive(struct specialix_board * bp) } -extern inline void sx_transmit(struct specialix_board * bp) +static inline void sx_transmit(struct specialix_board * bp) { struct specialix_port *port; struct tty_struct *tty; @@ -802,7 +802,7 @@ extern inline void sx_transmit(struct specialix_board * bp) } -extern inline void sx_check_modem(struct specialix_board * bp) +static inline void sx_check_modem(struct specialix_board * bp) { struct specialix_port *port; struct tty_struct *tty; @@ -962,7 +962,7 @@ void turn_ints_on (struct specialix_board *bp) /* Called with disabled interrupts */ -extern inline int sx_setup_board(struct specialix_board * bp) +static inline int sx_setup_board(struct specialix_board * bp) { int error; @@ -986,7 +986,7 @@ extern inline int sx_setup_board(struct specialix_board * bp) /* Called with disabled interrupts */ -extern inline void sx_shutdown_board(struct specialix_board *bp) +static inline void sx_shutdown_board(struct specialix_board *bp) { if (!(bp->flags & SX_BOARD_ACTIVE)) return; @@ -1867,7 +1867,7 @@ static int sx_set_modem_info(struct specialix_port * port, unsigned int cmd, } -extern inline void sx_send_break(struct specialix_port * port, unsigned long length) +static inline void sx_send_break(struct specialix_port * port, unsigned long length) { struct specialix_board *bp = port_Board(port); unsigned long flags; @@ -1886,7 +1886,7 @@ extern inline void sx_send_break(struct specialix_port * port, unsigned long len } -extern inline int sx_set_serial_info(struct specialix_port * port, +static inline int sx_set_serial_info(struct specialix_port * port, struct serial_struct * newinfo) { struct serial_struct tmp; @@ -1942,7 +1942,7 @@ extern inline int sx_set_serial_info(struct specialix_port * port, } -extern inline int sx_get_serial_info(struct specialix_port * port, +static inline int sx_get_serial_info(struct specialix_port * port, struct serial_struct * retinfo) { struct serial_struct tmp; |
