[PATCH] make lots of things static
Another large rollup of various patches from Adrian which make things static where they were needlessly exported. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
这个提交包含在:
@@ -192,7 +192,7 @@ static struct aper_size_info_32 ali_generic_sizes[7] =
|
||||
{4, 1024, 0, 3}
|
||||
};
|
||||
|
||||
struct agp_bridge_driver ali_generic_bridge = {
|
||||
static struct agp_bridge_driver ali_generic_bridge = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = ali_generic_sizes,
|
||||
.size_type = U32_APER_SIZE,
|
||||
@@ -215,7 +215,7 @@ struct agp_bridge_driver ali_generic_bridge = {
|
||||
.agp_destroy_page = ali_destroy_page,
|
||||
};
|
||||
|
||||
struct agp_bridge_driver ali_m1541_bridge = {
|
||||
static struct agp_bridge_driver ali_m1541_bridge = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = ali_generic_sizes,
|
||||
.size_type = U32_APER_SIZE,
|
||||
|
@@ -358,7 +358,7 @@ static struct gatt_mask amd_irongate_masks[] =
|
||||
{.mask = 1, .type = 0}
|
||||
};
|
||||
|
||||
struct agp_bridge_driver amd_irongate_driver = {
|
||||
static struct agp_bridge_driver amd_irongate_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = amd_irongate_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
|
@@ -243,7 +243,7 @@ static void amd64_cleanup(void)
|
||||
}
|
||||
|
||||
|
||||
struct agp_bridge_driver amd_8151_driver = {
|
||||
static struct agp_bridge_driver amd_8151_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = amd_8151_sizes,
|
||||
.size_type = U32_APER_SIZE,
|
||||
|
@@ -393,7 +393,7 @@ static int ati_free_gatt_table(struct agp_bridge_data *bridge)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct agp_bridge_driver ati_generic_bridge = {
|
||||
static struct agp_bridge_driver ati_generic_bridge = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = ati_generic_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
|
@@ -97,7 +97,7 @@ void agp_backend_release(struct agp_bridge_data *bridge)
|
||||
EXPORT_SYMBOL(agp_backend_release);
|
||||
|
||||
|
||||
struct { int mem, agp; } maxes_table[] = {
|
||||
static struct { int mem, agp; } maxes_table[] = {
|
||||
{0, 0},
|
||||
{32, 4},
|
||||
{64, 28},
|
||||
@@ -322,7 +322,7 @@ static int __init agp_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __exit agp_exit(void)
|
||||
static void __exit agp_exit(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -303,7 +303,7 @@ static int efficeon_remove_memory(struct agp_memory * mem, off_t pg_start, int t
|
||||
}
|
||||
|
||||
|
||||
struct agp_bridge_driver efficeon_driver = {
|
||||
static struct agp_bridge_driver efficeon_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = efficeon_generic_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
|
@@ -235,7 +235,7 @@ static void agp_insert_into_pool(struct agp_memory * temp)
|
||||
|
||||
/* File private list routines */
|
||||
|
||||
struct agp_file_private *agp_find_private(pid_t pid)
|
||||
static struct agp_file_private *agp_find_private(pid_t pid)
|
||||
{
|
||||
struct agp_file_private *curr;
|
||||
|
||||
@@ -250,7 +250,7 @@ struct agp_file_private *agp_find_private(pid_t pid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void agp_insert_file_private(struct agp_file_private * priv)
|
||||
static void agp_insert_file_private(struct agp_file_private * priv)
|
||||
{
|
||||
struct agp_file_private *prev;
|
||||
|
||||
@@ -262,7 +262,7 @@ void agp_insert_file_private(struct agp_file_private * priv)
|
||||
agp_fe.file_priv_list = priv;
|
||||
}
|
||||
|
||||
void agp_remove_file_private(struct agp_file_private * priv)
|
||||
static void agp_remove_file_private(struct agp_file_private * priv)
|
||||
{
|
||||
struct agp_file_private *next;
|
||||
struct agp_file_private *prev;
|
||||
|
@@ -288,7 +288,7 @@ static struct gatt_mask nvidia_generic_masks[] =
|
||||
};
|
||||
|
||||
|
||||
struct agp_bridge_driver nvidia_driver = {
|
||||
static struct agp_bridge_driver nvidia_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = nvidia_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
|
@@ -119,7 +119,7 @@ static struct aper_size_info_8 sis_generic_sizes[7] =
|
||||
{4, 1024, 0, 3}
|
||||
};
|
||||
|
||||
struct agp_bridge_driver sis_driver = {
|
||||
static struct agp_bridge_driver sis_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = sis_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
|
@@ -409,7 +409,7 @@ static void serverworks_agp_enable(struct agp_bridge_data *bridge, u32 mode)
|
||||
agp_device_command(command, 0);
|
||||
}
|
||||
|
||||
struct agp_bridge_driver sworks_driver = {
|
||||
static struct agp_bridge_driver sworks_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = serverworks_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
|
@@ -170,7 +170,7 @@ static void via_tlbflush_agp3(struct agp_memory *mem)
|
||||
}
|
||||
|
||||
|
||||
struct agp_bridge_driver via_agp3_driver = {
|
||||
static struct agp_bridge_driver via_agp3_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = agp3_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
@@ -193,7 +193,7 @@ struct agp_bridge_driver via_agp3_driver = {
|
||||
.agp_destroy_page = agp_generic_destroy_page,
|
||||
};
|
||||
|
||||
struct agp_bridge_driver via_driver = {
|
||||
static struct agp_bridge_driver via_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.aperture_sizes = via_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
|
@@ -221,7 +221,7 @@ static int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
|
||||
/* Set the mask to all-ones. This alas, only supports 32 interrupts.
|
||||
Some architectures may need more. -- Changed to LONG to
|
||||
support up to 64 bits on 64bit architectures. -- REW 20/06/99 */
|
||||
long rio_irqmask = -1;
|
||||
static long rio_irqmask = -1;
|
||||
|
||||
MODULE_AUTHOR("Rogier Wolff <R.E.Wolff@bitwizard.nl>, Patrick van de Lageweg <patrick@bitwizard.nl>");
|
||||
MODULE_DESCRIPTION("RIO driver");
|
||||
|
@@ -466,7 +466,7 @@ static int stl_parsebrd(stlconf_t *confp, char **argp);
|
||||
|
||||
static unsigned long stl_atol(char *str);
|
||||
|
||||
int stl_init(void);
|
||||
static int stl_init(void);
|
||||
static int stl_open(struct tty_struct *tty, struct file *filp);
|
||||
static void stl_close(struct tty_struct *tty, struct file *filp);
|
||||
static int stl_write(struct tty_struct *tty, const unsigned char *buf, int count);
|
||||
@@ -3063,7 +3063,7 @@ static struct tty_operations stl_ops = {
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
int __init stl_init(void)
|
||||
static int __init stl_init(void)
|
||||
{
|
||||
int i;
|
||||
printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion);
|
||||
|
在新工单中引用
屏蔽一个用户