Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  zorro: Fix reading of proc/bus/zorro/* in small chunks
  zorro: BKL removal
  m68k/mac: Fix RTC on PMU machines
  m68k/mac: Add color classic ii support
  arch/m68k/sun3/leds.c: Checkpatch cleanup
This commit is contained in:
Linus Torvalds 2010-08-10 14:13:35 -07:00
Родитель 0d6ffdb8f1 2190a1e770
Коммит a92b166e6b
4 изменённых файлов: 23 добавлений и 13 удалений

Просмотреть файл

@ -332,6 +332,15 @@ static struct mac_model mac_data_table[] = {
.scc_type = MAC_SCC_II, .scc_type = MAC_SCC_II,
.nubus_type = MAC_NUBUS, .nubus_type = MAC_NUBUS,
.floppy_type = MAC_FLOPPY_SWIM_ADDR2, .floppy_type = MAC_FLOPPY_SWIM_ADDR2,
}, {
.ident = MAC_MODEL_CCLII,
.name = "Color Classic II",
.adb_type = MAC_ADB_CUDA,
.via_type = MAC_VIA_IIci,
.scsi_type = MAC_SCSI_OLD,
.scc_type = MAC_SCC_II,
.nubus_type = MAC_NUBUS,
.floppy_type = MAC_FLOPPY_SWIM_ADDR2,
}, },
/* /*

Просмотреть файл

@ -91,7 +91,7 @@ static void cuda_write_pram(int offset, __u8 data)
#define cuda_write_pram NULL #define cuda_write_pram NULL
#endif #endif
#if 0 /* def CONFIG_ADB_PMU68K */ #ifdef CONFIG_ADB_PMU68K
static long pmu_read_time(void) static long pmu_read_time(void)
{ {
struct adb_request req; struct adb_request req;
@ -102,8 +102,8 @@ static long pmu_read_time(void)
while (!req.complete) while (!req.complete)
pmu_poll(); pmu_poll();
time = (req.reply[0] << 24) | (req.reply[1] << 16) time = (req.reply[1] << 24) | (req.reply[2] << 16)
| (req.reply[2] << 8) | req.reply[3]; | (req.reply[3] << 8) | req.reply[4];
return time - RTC_OFFSET; return time - RTC_OFFSET;
} }

Просмотреть файл

@ -8,6 +8,6 @@ void sun3_leds(unsigned char byte)
GET_DFC(dfc); GET_DFC(dfc);
SET_DFC(FC_CONTROL); SET_DFC(FC_CONTROL);
SET_CONTROL_BYTE(AC_LEDS,byte); SET_CONTROL_BYTE(AC_LEDS, byte);
SET_DFC(dfc); SET_DFC(dfc);
} }

Просмотреть файл

@ -22,8 +22,9 @@ static loff_t
proc_bus_zorro_lseek(struct file *file, loff_t off, int whence) proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
{ {
loff_t new = -1; loff_t new = -1;
struct inode *inode = file->f_path.dentry->d_inode;
lock_kernel(); mutex_lock(&inode->i_mutex);
switch (whence) { switch (whence) {
case 0: case 0:
new = off; new = off;
@ -35,12 +36,12 @@ proc_bus_zorro_lseek(struct file *file, loff_t off, int whence)
new = sizeof(struct ConfigDev) + off; new = sizeof(struct ConfigDev) + off;
break; break;
} }
if (new < 0 || new > sizeof(struct ConfigDev)) { if (new < 0 || new > sizeof(struct ConfigDev))
unlock_kernel(); new = -EINVAL;
return -EINVAL; else
} file->f_pos = new;
unlock_kernel(); mutex_unlock(&inode->i_mutex);
return (file->f_pos = new); return new;
} }
static ssize_t static ssize_t
@ -67,7 +68,7 @@ proc_bus_zorro_read(struct file *file, char __user *buf, size_t nbytes, loff_t *
cd.cd_BoardAddr = (void *)zorro_resource_start(z); cd.cd_BoardAddr = (void *)zorro_resource_start(z);
cd.cd_BoardSize = zorro_resource_len(z); cd.cd_BoardSize = zorro_resource_len(z);
if (copy_to_user(buf, &cd, nbytes)) if (copy_to_user(buf, (void *)&cd + pos, nbytes))
return -EFAULT; return -EFAULT;
*ppos += nbytes; *ppos += nbytes;