Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1055 → Rev 1056

/shark/trunk/drivers/linuxc26/include/linux/byteorder/swab.h
128,7 → 128,7
#endif /* OPTIMIZE */
 
 
static __inline__ __const__ __u16 __fswab16(__u16 x)
static __inline__ __attribute__((const)) __u16 __fswab16(__u16 x)
{
return __arch__swab16(x);
}
141,7 → 141,7
__arch__swab16s(addr);
}
 
static __inline__ __const__ __u32 __fswab32(__u32 x)
static __inline__ __attribute__((const)) __u32 __fswab32(__u32 x)
{
return __arch__swab32(x);
}
155,7 → 155,7
}
 
#ifdef __BYTEORDER_HAS_U64__
static __inline__ __const__ __u64 __fswab64(__u64 x)
static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
{
# ifdef __SWAB_64_THRU_32__
__u32 h = x >> 32;
/shark/trunk/drivers/linuxc26/include/linux/fb.h
512,7 → 512,6
 
/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 34
extern const struct fb_videomode vesa_modes[];
 
/* drivers/video/fbcmap.c */
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
539,6 → 538,9
u32 vmode;
};
 
// moved here for gcc4 compatibility
extern const struct fb_videomode vesa_modes[];
 
#ifdef MODULE
static inline int fb_find_mode(struct fb_var_screeninfo *var,
struct fb_info *info, const char *mode_option,
/shark/trunk/drivers/linuxc26/include/linux/rcupdate.h
111,6 → 111,7
 
static inline int rcu_pending(int cpu)
{
/*
if ((!list_empty(&RCU_curlist(cpu)) &&
rcu_batch_before(RCU_batch(cpu), rcu_ctrlblk.curbatch)) ||
(list_empty(&RCU_curlist(cpu)) &&
119,6 → 120,8
return 1;
else
return 0;
*/
return(1);
}
 
#define rcu_read_lock() preempt_disable()
/shark/trunk/drivers/linuxc26/include/linux/i2c.h
23,7 → 23,7
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
 
/* $Id: i2c.h,v 1.1 2004-01-28 15:25:29 giacomo Exp $ */
/* $Id: i2c.h,v 1.2 2006-09-20 05:28:07 tullio Exp $ */
 
#ifndef _LINUX_I2C_H
#define _LINUX_I2C_H
53,10 → 53,6
extern int i2c_master_send(struct i2c_client *,const char* ,int);
extern int i2c_master_recv(struct i2c_client *,char* ,int);
 
/* Transfer num messages.
*/
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
 
/*
* Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
* This is not tested/implemented yet and will change in the future.
188,37 → 184,6
}
 
/*
* The following structs are for those who like to implement new bus drivers:
* i2c_algorithm is the interface to a class of hardware solutions which can
* be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584
* to name two of the most common.
*/
struct i2c_algorithm {
char name[32]; /* textual description */
unsigned int id;
 
/* If an adapter algorithm can't to I2C-level access, set master_xfer
to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated
using common I2C messages */
int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
int num);
int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data * data);
 
/* --- these optional/future use for some adapter types.*/
int (*slave_send)(struct i2c_adapter *,char*,int);
int (*slave_recv)(struct i2c_adapter *,char*,int);
 
/* --- ioctl like call to set div. parameters. */
int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long);
 
/* To determine what the adapter supports */
u32 (*functionality) (struct i2c_adapter *);
};
 
/*
* i2c_adapter is the structure used to identify a physical i2c bus along
* with the access algorithms necessary to access it.
*/
401,6 → 366,42
__u8 *buf; /* pointer to msg data */
};
 
// moved here for gcc4 compatibility
/* Transfer num messages. */
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
 
// moved here for gcc4 compatibility
/*
* The following structs are for those who like to implement new bus drivers:
* i2c_algorithm is the interface to a class of hardware solutions which can
* be addressed using the same bus algorithms - i.e. bit-banging or the PCF8584
* to name two of the most common.
*/
struct i2c_algorithm {
char name[32]; /* textual description */
unsigned int id;
 
/* If an adapter algorithm can't to I2C-level access, set master_xfer
to NULL. If an adapter algorithm can do SMBus access, set
smbus_xfer. If set to NULL, the SMBus protocol is simulated
using common I2C messages */
int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
int num);
int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data * data);
 
/* --- these optional/future use for some adapter types.*/
int (*slave_send)(struct i2c_adapter *,char*,int);
int (*slave_recv)(struct i2c_adapter *,char*,int);
 
/* --- ioctl like call to set div. parameters. */
int (*algo_control)(struct i2c_adapter *, unsigned int, unsigned long);
 
/* To determine what the adapter supports */
u32 (*functionality) (struct i2c_adapter *);
};
 
/* To determine what functionality is present */
 
#define I2C_FUNC_I2C 0x00000001
/shark/trunk/drivers/linuxc26/include/asm/byteorder.h
10,7 → 10,7
#include <linux/config.h>
#endif
 
static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
static __inline__ __attribute__((const)) __u32 ___arch__swab32(__u32 x)
{
#ifdef CONFIG_X86_BSWAP
__asm__("bswap %0" : "=r" (x) : "0" (x));
26,7 → 26,7
 
/* gcc should generate this for open coded C now too. May be worth switching to
it because inline assembly cannot be scheduled. -AK */
static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
static __inline__ __attribute__((const)) __u16 ___arch__swab16(__u16 x)
{
__asm__("xchgb %b0,%h0" /* swap bytes */
: "=q" (x)
/shark/trunk/drivers/linuxc26/include/asm/processor.h
83,7 → 83,6
 
extern struct cpuinfo_x86 boot_cpu_data;
extern struct cpuinfo_x86 new_cpu_data;
extern struct tss_struct init_tss[NR_CPUS];
extern struct tss_struct doublefault_tss;
 
#ifdef CONFIG_SMP
403,6 → 402,9
unsigned long stack[64];
} __attribute__((packed));
 
// moved here for gcc4 compatibility
extern struct tss_struct init_tss[NR_CPUS];
 
struct thread_struct {
/* cached TLS descriptors. */
struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
/shark/trunk/drivers/linuxc26/videodev.c
355,8 → 355,8
//up(&videodev_lock);
}
 
 
static struct file_operations video_fops=
// removed "static" for gcc 4x compatibility
struct file_operations video_fops=
{
.owner = THIS_MODULE,
.llseek = no_llseek,
/shark/trunk/drivers/linuxc26/waitqueue.c
49,7 → 49,8
 
}
 
void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr_exclusive)
{
unsigned long flags;
 
63,7 → 64,8
list_add(&new->task_list, &head->task_list);
}
 
void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
{
unsigned long flags;
 
73,7 → 75,8
spin_unlock_irqrestore(&q->lock, flags);
}
 
void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait)
{
unsigned long flags;
 
/shark/trunk/drivers/linuxc26/linuxcomp.c
241,7 → 241,8
 
unsigned long pci_mem_start = 0x10000000;
 
signed long schedule_timeout(signed long timeout)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) signed long schedule_timeout(signed long timeout)
{
struct timespec t,s,e;
 
335,13 → 336,15
init_waitqueue_head(&x->wait);
}
 
void complete(struct completion *x)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) void complete(struct completion *x)
{
x->done++;
__wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE, 1, 0);
}
 
void wait_for_completion(struct completion *x)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) void wait_for_completion(struct completion *x)
{
spin_lock_irq(&x->wait.lock);
if (!x->done) {
465,7 → 468,8
 
struct page *mem_map = 0x0000;
 
int schedule_work(struct work_struct *work)
// added __attribute__ for gcc4 compatibility
__attribute__((regparm(3))) int schedule_work(struct work_struct *work)
{
return 0;
}