Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13655
b: refs/heads/master
c: cad8e94
h: refs/heads/master
i:
  13653: a408325
  13651: 38a7b9b
  13647: 7d45db5
v: v3
  • Loading branch information
Linus Torvalds committed Nov 9, 2005
1 parent c975e55 commit e4de748
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f0ede52a0ebfe1fe99ee5bfd99d17e6ac0c503d
refs/heads/master: cad8e944364bd84c8c03e8c99e3fffa1cb2fc1ba
4 changes: 2 additions & 2 deletions trunk/arch/sparc/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
{ 9, 3, "Fujitsu or Weitek on-chip FPU"},
};

#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))
#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)

struct cpu_iu_info linux_sparc_chips[] = {
/* Sun4/100, 4/200, SLC */
Expand Down Expand Up @@ -120,7 +120,7 @@ struct cpu_iu_info linux_sparc_chips[] = {
{ 0xf, 0, "UNKNOWN CPU-VENDOR/TYPE"},
};

#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))
#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)

char *sparc_cpu_type;
char *sparc_fpu_type;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/pcic.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static struct pcic_ca2irq pcic_i_jk[] = {
* as several PROMs may be installed on the same physical board.
*/
#define SN2L_INIT(name, map) \
{ name, map, sizeof(map)/sizeof(struct pcic_ca2irq) }
{ name, map, ARRAY_SIZE(map) }

static struct pcic_sn2list pcic_known_sysnames[] = {
SN2L_INIT("SUNW,JavaEngine1", pcic_i_je1a), /* JE1, PROM 2.32 */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include <asm/kdebug.h>
#include <asm/uaccess.h>

#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))

extern int prom_node_root;

/* At boot time we determine these two values necessary for setting
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc64/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
{ 0x3e, 0x22, 0, "UltraSparc IIIi+ integrated FPU"},
};

#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))
#define NSPARCFPU ARRAY_SIZE(linux_sparc_fpu)

struct cpu_iu_info linux_sparc_chips[] = {
{ 0x17, 0x10, "TI UltraSparc I (SpitFire)"},
Expand All @@ -59,7 +59,7 @@ struct cpu_iu_info linux_sparc_chips[] = {
{ 0x3e, 0x22, "TI UltraSparc IIIi+ (Serrano)"},
};

#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))
#define NSPARCCHIPS ARRAY_SIZE(linux_sparc_chips)

char *sparc_cpu_type = "cpu-oops";
char *sparc_fpu_type = "fpu-oops";
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc64/kernel/ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ COMPATIBLE_IOCTL(FBIOGCURPOS)
COMPATIBLE_IOCTL(FBIOGCURMAX)
/* Little k */
/* Little v, the video4linux ioctls */
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
/* And these ioctls need translation */
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc64/kernel/sbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ static unsigned long sysio_irq_offsets[] = {

#undef bogon

#define NUM_SYSIO_OFFSETS (sizeof(sysio_irq_offsets) / sizeof(sysio_irq_offsets[0]))
#define NUM_SYSIO_OFFSETS ARRAY_SIZE(sysio_irq_offsets)

/* Convert Interrupt Mapping register pointer to associated
* Interrupt Clear register pointer, SYSIO specific version.
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <asm/sections.h>
#include <asm/kdebug.h>

#define ELEMENTS(arr) (sizeof (arr)/sizeof (arr[0]))

/*
* To debug kernel to catch accesses to certain virtual/physical addresses.
* Mode = 0 selects physical watchpoints, mode = 1 selects virtual watchpoints.
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/sbus/char/cpwatchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static long wd_compat_ioctl(struct file *file, unsigned int cmd,
case WIOCGSTAT:
lock_kernel();
rval = wd_ioctl(file->f_dentry->d_inode, file, cmd, arg);
lock_kernel();
unlock_kernel();
break;
/* everything else is handled by the generic compat layer */
default:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/sbus/char/display7seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
writeb(regs, d7s_regs);
break;
};
lock_kernel();
unlock_kernel();

return error;
}
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/sbus/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,27 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}

static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
int rval = -ENOIOCTLCMD;

switch (cmd) {
/*
* These two are specific to this driver, the generic rtc ioctls
* are hanlded elsewhere.
*/
case RTCGET:
case RTCSET:
lock_kernel();
rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
unlock_kernel();
break;
}

return rval;
}

static int rtc_open(struct inode *inode, struct file *file)
{
int ret;
Expand Down Expand Up @@ -237,6 +258,7 @@ static struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = rtc_ioctl,
.compat_ioctl = rtc_compat_ioctl,
.open = rtc_open,
.release = rtc_release,
};
Expand Down

0 comments on commit e4de748

Please sign in to comment.