mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
[PATCH] make some things static
This patch makes some needlessly global identifiers static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Arjan van de Ven <arjanv@infradead.org> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
5e198d94dd
commit
75c96f8584
38 changed files with 93 additions and 86 deletions
|
|
@ -74,7 +74,7 @@ static struct request_queue *rd_queue[CONFIG_BLK_DEV_RAM_COUNT];
|
|||
* architecture-specific setup routine (from the stored boot sector
|
||||
* information).
|
||||
*/
|
||||
int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */
|
||||
static int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */
|
||||
/*
|
||||
* It would be very desirable to have a soft-blocksize (that in the case
|
||||
* of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ module_param(cdu31a_irq, int, 0);
|
|||
|
||||
/* The interrupt handler will wake this queue up when it gets an
|
||||
interrupts. */
|
||||
DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait);
|
||||
static DECLARE_WAIT_QUEUE_HEAD(cdu31a_irq_wait);
|
||||
static int irq_flag = 0;
|
||||
|
||||
static int curr_control_reg = 0; /* Current value of the control register */
|
||||
|
|
@ -2947,7 +2947,7 @@ static int scd_block_media_changed(struct gendisk *disk)
|
|||
return cdrom_media_changed(&scd_info);
|
||||
}
|
||||
|
||||
struct block_device_operations scd_bdops =
|
||||
static struct block_device_operations scd_bdops =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.open = scd_block_open,
|
||||
|
|
@ -3216,7 +3216,7 @@ errout3:
|
|||
}
|
||||
|
||||
|
||||
void __exit cdu31a_exit(void)
|
||||
static void __exit cdu31a_exit(void)
|
||||
{
|
||||
del_gendisk(scd_gendisk);
|
||||
put_disk(scd_gendisk);
|
||||
|
|
|
|||
|
|
@ -107,20 +107,20 @@ static const char *mcdx_c_version
|
|||
The _direct_ size is the number of sectors we're allowed to skip
|
||||
directly (performing a read instead of requesting the new sector
|
||||
needed */
|
||||
const int REQUEST_SIZE = 800; /* should be less then 255 * 4 */
|
||||
const int DIRECT_SIZE = 400; /* should be less then REQUEST_SIZE */
|
||||
static const int REQUEST_SIZE = 800; /* should be less then 255 * 4 */
|
||||
static const int DIRECT_SIZE = 400; /* should be less then REQUEST_SIZE */
|
||||
|
||||
enum drivemodes { TOC, DATA, RAW, COOKED };
|
||||
enum datamodes { MODE0, MODE1, MODE2 };
|
||||
enum resetmodes { SOFT, HARD };
|
||||
|
||||
const int SINGLE = 0x01; /* single speed drive (FX001S, LU) */
|
||||
const int DOUBLE = 0x02; /* double speed drive (FX001D, ..? */
|
||||
const int DOOR = 0x04; /* door locking capability */
|
||||
const int MULTI = 0x08; /* multi session capability */
|
||||
static const int SINGLE = 0x01; /* single speed drive (FX001S, LU) */
|
||||
static const int DOUBLE = 0x02; /* double speed drive (FX001D, ..? */
|
||||
static const int DOOR = 0x04; /* door locking capability */
|
||||
static const int MULTI = 0x08; /* multi session capability */
|
||||
|
||||
const unsigned char READ1X = 0xc0;
|
||||
const unsigned char READ2X = 0xc1;
|
||||
static const unsigned char READ1X = 0xc0;
|
||||
static const unsigned char READ2X = 0xc1;
|
||||
|
||||
|
||||
/* DECLARATIONS ****************************************************/
|
||||
|
|
@ -210,9 +210,7 @@ struct s_drive_stuff {
|
|||
repeated here to show what's going on. And to sense, if they're
|
||||
changed elsewhere. */
|
||||
|
||||
/* declared in blk.h */
|
||||
int mcdx_init(void);
|
||||
void do_mcdx_request(request_queue_t * q);
|
||||
static int mcdx_init(void);
|
||||
|
||||
static int mcdx_block_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
|
|
@ -569,7 +567,7 @@ static int mcdx_audio_ioctl(struct cdrom_device_info *cdi,
|
|||
}
|
||||
}
|
||||
|
||||
void do_mcdx_request(request_queue_t * q)
|
||||
static void do_mcdx_request(request_queue_t * q)
|
||||
{
|
||||
struct s_drive_stuff *stuffp;
|
||||
struct request *req;
|
||||
|
|
@ -1028,7 +1026,7 @@ int __mcdx_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void __exit mcdx_exit(void)
|
||||
static void __exit mcdx_exit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -1075,7 +1073,7 @@ module_exit(mcdx_exit);
|
|||
|
||||
/* Support functions ************************************************/
|
||||
|
||||
int __init mcdx_init_drive(int drive)
|
||||
static int __init mcdx_init_drive(int drive)
|
||||
{
|
||||
struct s_version version;
|
||||
struct gendisk *disk;
|
||||
|
|
@ -1261,7 +1259,7 @@ int __init mcdx_init_drive(int drive)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __init mcdx_init(void)
|
||||
static int __init mcdx_init(void)
|
||||
{
|
||||
int drive;
|
||||
xwarn("Version 2.14(hs) \n");
|
||||
|
|
|
|||
|
|
@ -5895,7 +5895,7 @@ int __init sbpcd_init(void)
|
|||
}
|
||||
/*==========================================================================*/
|
||||
#ifdef MODULE
|
||||
void sbpcd_exit(void)
|
||||
static void sbpcd_exit(void)
|
||||
{
|
||||
int j;
|
||||
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,8 @@ static void kbd_rawcode(unsigned char data)
|
|||
put_queue(vc, data);
|
||||
}
|
||||
|
||||
void kbd_keycode(unsigned int keycode, int down, int hw_raw, struct pt_regs *regs)
|
||||
static void kbd_keycode(unsigned int keycode, int down,
|
||||
int hw_raw, struct pt_regs *regs)
|
||||
{
|
||||
struct vc_data *vc = vc_cons[fg_console].d;
|
||||
unsigned short keysym, *key_map;
|
||||
|
|
|
|||
|
|
@ -957,7 +957,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
|
|||
}
|
||||
|
||||
|
||||
struct super_type super_types[] = {
|
||||
static struct super_type super_types[] = {
|
||||
[0] = {
|
||||
.name = "0.90.0",
|
||||
.owner = THIS_MODULE,
|
||||
|
|
@ -2740,7 +2740,7 @@ static struct block_device_operations md_fops =
|
|||
.revalidate_disk= md_revalidate,
|
||||
};
|
||||
|
||||
int md_thread(void * arg)
|
||||
static int md_thread(void * arg)
|
||||
{
|
||||
mdk_thread_t *thread = arg;
|
||||
|
||||
|
|
@ -3232,7 +3232,7 @@ void md_handle_safemode(mddev_t *mddev)
|
|||
}
|
||||
|
||||
|
||||
DECLARE_WAIT_QUEUE_HEAD(resync_wait);
|
||||
static DECLARE_WAIT_QUEUE_HEAD(resync_wait);
|
||||
|
||||
#define SYNC_MARKS 10
|
||||
#define SYNC_MARK_STEP (3*HZ)
|
||||
|
|
@ -3575,8 +3575,8 @@ void md_check_recovery(mddev_t *mddev)
|
|||
}
|
||||
}
|
||||
|
||||
int md_notify_reboot(struct notifier_block *this,
|
||||
unsigned long code, void *x)
|
||||
static int md_notify_reboot(struct notifier_block *this,
|
||||
unsigned long code, void *x)
|
||||
{
|
||||
struct list_head *tmp;
|
||||
mddev_t *mddev;
|
||||
|
|
@ -3599,7 +3599,7 @@ int md_notify_reboot(struct notifier_block *this,
|
|||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
struct notifier_block md_notifier = {
|
||||
static struct notifier_block md_notifier = {
|
||||
.notifier_call = md_notify_reboot,
|
||||
.next = NULL,
|
||||
.priority = INT_MAX, /* before any real devices */
|
||||
|
|
@ -3616,7 +3616,7 @@ static void md_geninit(void)
|
|||
p->proc_fops = &md_seq_fops;
|
||||
}
|
||||
|
||||
int __init md_init(void)
|
||||
static int __init md_init(void)
|
||||
{
|
||||
int minor;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
|
|||
mempool_free(mp_bh, conf->pool);
|
||||
}
|
||||
|
||||
int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error)
|
||||
static int multipath_end_request(struct bio *bio, unsigned int bytes_done,
|
||||
int error)
|
||||
{
|
||||
int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
|
||||
struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#ifdef CONFIG_COPS_DAYNA
|
||||
|
||||
unsigned char ffdrv_code[] = {
|
||||
static const unsigned char ffdrv_code[] = {
|
||||
58,3,0,50,228,149,33,255,255,34,226,149,
|
||||
249,17,40,152,33,202,154,183,237,82,77,68,
|
||||
11,107,98,19,54,0,237,176,175,50,80,0,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#ifdef CONFIG_COPS_TANGENT
|
||||
|
||||
unsigned char ltdrv_code[] = {
|
||||
static const unsigned char ltdrv_code[] = {
|
||||
58,3,0,50,148,10,33,143,15,62,85,119,
|
||||
190,32,9,62,170,119,190,32,3,35,24,241,
|
||||
34,146,10,249,17,150,10,33,143,15,183,237,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
|
|||
static int ack_tx(struct net_device *dev, int acked);
|
||||
|
||||
|
||||
struct ArcProto capmode_proto =
|
||||
static struct ArcProto capmode_proto =
|
||||
{
|
||||
'r',
|
||||
XMTU,
|
||||
|
|
|
|||
|
|
@ -1312,7 +1312,7 @@ int fb_get_options(char *name, char **option)
|
|||
* Returns zero.
|
||||
*
|
||||
*/
|
||||
int __init video_setup(char *options)
|
||||
static int __init video_setup(char *options)
|
||||
{
|
||||
int i, global = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ static ssize_t show_pan(struct class_device *class_device, char *buf)
|
|||
fb_info->var.xoffset);
|
||||
}
|
||||
|
||||
struct class_device_attribute class_device_attrs[] = {
|
||||
static struct class_device_attribute class_device_attrs[] = {
|
||||
__ATTR(bits_per_pixel, S_IRUGO|S_IWUSR, show_bpp, store_bpp),
|
||||
__ATTR(blank, S_IRUGO|S_IWUSR, show_blank, store_blank),
|
||||
__ATTR(color_map, S_IRUGO|S_IWUSR, show_cmap, store_cmap),
|
||||
|
|
|
|||
|
|
@ -1384,7 +1384,7 @@ SiSInitPCIetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
|||
/* HELPER: SetLVDSetc */
|
||||
/*********************************************/
|
||||
|
||||
void
|
||||
static void
|
||||
SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
||||
{
|
||||
USHORT temp;
|
||||
|
|
@ -1625,7 +1625,7 @@ SiS_ResetSegmentRegisters(SiS_Private *SiS_Pr,PSIS_HW_INFO HwInfo)
|
|||
/* HELPER: GetVBType */
|
||||
/*********************************************/
|
||||
|
||||
void
|
||||
static void
|
||||
SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
||||
{
|
||||
USHORT flag=0, rev=0, nolcd=0, p4_0f, p4_25, p4_27;
|
||||
|
|
|
|||
|
|
@ -2394,11 +2394,9 @@ void SiS_SetRegOR(SISIOADDRESS Port,USHORT Index, USHORT DataOR);
|
|||
void SiS_DisplayOn(SiS_Private *SiS_Pr);
|
||||
void SiS_DisplayOff(SiS_Private *SiS_Pr);
|
||||
void SiSRegInit(SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
|
||||
void SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
BOOLEAN SiSDetermineROMLayout661(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
void SiS_SetEnableDstn(SiS_Private *SiS_Pr, int enable);
|
||||
void SiS_SetEnableFstn(SiS_Private *SiS_Pr, int enable);
|
||||
void SiS_GetVBType(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
BOOLEAN SiS_SearchModeID(SiS_Private *SiS_Pr, USHORT *ModeNo, USHORT *ModeIdIndex);
|
||||
UCHAR SiS_GetModePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
|
||||
USHORT SiS_GetColorDepth(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex);
|
||||
|
|
@ -2444,7 +2442,6 @@ extern void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT Mod
|
|||
extern void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
extern void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
|
||||
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
extern void SiS_DisableBridge(SiS_Private *, PSIS_HW_INFO);
|
||||
extern BOOLEAN SiS_SetCRT2Group(SiS_Private *, PSIS_HW_INFO, USHORT);
|
||||
extern USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@
|
|||
#define SiS_I2CDELAYSHORT 150
|
||||
|
||||
static USHORT SiS_GetBIOSLCDResInfo(SiS_Private *SiS_Pr);
|
||||
static void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx);
|
||||
|
||||
/*********************************************/
|
||||
/* HELPER: Lock/Unlock CRT2 */
|
||||
|
|
@ -100,7 +101,7 @@ SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
|||
SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x24,0x01);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
||||
{
|
||||
if(HwInfo->jChipType >= SIS_315H)
|
||||
|
|
@ -4236,7 +4237,7 @@ SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
|||
* from outside the context of a mode switch!
|
||||
* MUST call getVBType before calling this
|
||||
*/
|
||||
void
|
||||
static void
|
||||
SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
|
||||
{
|
||||
USHORT temp=0,tempah;
|
||||
|
|
@ -9219,7 +9220,7 @@ SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempbx)
|
|||
SiS_SetChReg(SiS_Pr, tempbx, 0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
|
||||
{
|
||||
if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
|
||||
|
|
@ -9323,7 +9324,7 @@ SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempbx)
|
|||
|
||||
/* Read from Chrontel 70xx */
|
||||
/* Parameter is [Register no (S7-S0)] */
|
||||
USHORT
|
||||
static USHORT
|
||||
SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempbx)
|
||||
{
|
||||
if(SiS_Pr->SiS_IF_DEF_CH70xx == 1)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,6 @@ static UCHAR SiS300_TrumpionData[7][80] = {
|
|||
#endif
|
||||
|
||||
void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
void SiS_EnableCRT2(SiS_Private *SiS_Pr);
|
||||
USHORT SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
|
||||
void SiS_WaitRetrace1(SiS_Private *SiS_Pr);
|
||||
|
|
@ -310,7 +309,6 @@ USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
|
|||
USHORT RefreshRateTableIndex, PSIS_HW_INFO HwInfo);
|
||||
USHORT SiS_GetResInfo(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex);
|
||||
void SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
void SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
BOOLEAN SiS_SetCRT2Group(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT ModeNo);
|
||||
void SiS_SiS30xBLOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
void SiS_SiS30xBLOff(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
|
|
@ -319,8 +317,6 @@ void SiS_SetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
|
|||
USHORT SiS_GetCH700x(SiS_Private *SiS_Pr, USHORT tempax);
|
||||
void SiS_SetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
|
||||
USHORT SiS_GetCH701x(SiS_Private *SiS_Pr, USHORT tempax);
|
||||
void SiS_SetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
|
||||
USHORT SiS_GetCH70xx(SiS_Private *SiS_Pr, USHORT tempax);
|
||||
void SiS_SetCH70xxANDOR(SiS_Private *SiS_Pr, USHORT tempax,USHORT tempbh);
|
||||
#ifdef SIS315H
|
||||
static void SiS_Chrontel701xOn(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
|
||||
|
|
|
|||
|
|
@ -4762,7 +4762,8 @@ static void __devinit sisfb_post_sis315330(struct pci_dev *pdev)
|
|||
#endif
|
||||
|
||||
|
||||
int __devinit sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
static int __devinit sisfb_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
{
|
||||
struct sisfb_chip_info *chipinfo = &sisfb_chip_info[ent->driver_data];
|
||||
struct sis_video_info *ivideo = NULL;
|
||||
|
|
@ -5940,7 +5941,7 @@ MODULE_PARM_DESC(videoram,
|
|||
#endif
|
||||
#endif
|
||||
|
||||
int __devinit sisfb_init_module(void)
|
||||
static int __devinit sisfb_init_module(void)
|
||||
{
|
||||
sisfb_setdefaultparms();
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ static struct file_operations bad_file_ops =
|
|||
.get_unmapped_area = EIO_ERROR,
|
||||
};
|
||||
|
||||
struct inode_operations bad_inode_ops =
|
||||
static struct inode_operations bad_inode_ops =
|
||||
{
|
||||
.create = EIO_ERROR,
|
||||
.lookup = EIO_ERROR,
|
||||
|
|
|
|||
|
|
@ -1210,7 +1210,7 @@ grow_buffers(struct block_device *bdev, sector_t block, int size)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct buffer_head *
|
||||
static struct buffer_head *
|
||||
__getblk_slow(struct block_device *bdev, sector_t block, int size)
|
||||
{
|
||||
/* Size must be multiple of hard sectorsize */
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ void cd_forget(struct inode *inode)
|
|||
spin_unlock(&cdev_lock);
|
||||
}
|
||||
|
||||
void cdev_purge(struct cdev *cdev)
|
||||
static void cdev_purge(struct cdev *cdev)
|
||||
{
|
||||
spin_lock(&cdev_lock);
|
||||
while (!list_empty(&cdev->list)) {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue