Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13675
b: refs/heads/master
c: 4349d5c
h: refs/heads/master
i:
  13673: ffcc712
  13671: f846d8b
v: v3
  • Loading branch information
Hannes Reinecke authored and Bartlomiej Zolnierkiewicz committed Nov 9, 2005
1 parent 925aedb commit 9147244
Show file tree
Hide file tree
Showing 102 changed files with 623 additions and 12,028 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: b01a55a865eeac0371f1a73d36b134d23d938e1a
refs/heads/master: 4349d5cdf28d46c22d467079e80ee9695dcec0ad
6 changes: 4 additions & 2 deletions trunk/Documentation/i2c/busses/i2c-viapro
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Supported adapters:
* VIA Technologies, Inc. VT82C686A/B
Datasheet: Sometimes available at the VIA website

* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237R
Datasheet: available on request from VIA
* VIA Technologies, Inc. VT8231, VT8233, VT8233A, VT8235, VT8237
Datasheet: available on request from Via

Authors:
Frodo Looijaard <frodol@dds.nl>,
Philip Edelbrock <phil@netroedge.com>,
Ky�sti M�lkki <kmalkki@cc.hut.fi>,
Mark D. Studebaker <mdsxyz123@yahoo.com>,
Jean Delvare <khali@linux-fr.org>
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/i2c/writing-clients
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ For now, you can ignore the `flags' parameter. It is there for future use.
release_region(address,FOO_EXTENT);
/* SENSORS ONLY END */
ERROR1:
kfree(data);
kfree(new_client);
ERROR0:
return err;
}
Expand Down Expand Up @@ -443,7 +443,7 @@ much simpler than the attachment code, fortunately!
release_region(client->addr,LM78_EXTENT);
/* HYBRID SENSORS CHIP ONLY END */

kfree(i2c_get_clientdata(client));
kfree(data);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ int __devinit start_secondary(void *unused)

smp_store_cpu_info(cpu);
set_dec(tb_ticks_per_jiffy);
preempt_disable();
cpu_callin_map[cpu] = 1;

smp_ops->setup_cpu(cpu);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ppc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void cpu_idle(void)
int cpu = smp_processor_id();

for (;;) {
while (!need_resched()) {
while (need_resched()) {
if (ppc_md.idle != NULL)
ppc_md.idle();
else
Expand Down
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 ARRAY_SIZE(linux_sparc_fpu)
#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))

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 ARRAY_SIZE(linux_sparc_chips)
#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))

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, ARRAY_SIZE(map) }
{ name, map, sizeof(map)/sizeof(struct pcic_ca2irq) }

static struct pcic_sn2list pcic_known_sysnames[] = {
SN2L_INIT("SUNW,JavaEngine1", pcic_i_je1a), /* JE1, PROM 2.32 */
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#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 ARRAY_SIZE(linux_sparc_fpu)
#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))

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 ARRAY_SIZE(linux_sparc_chips)
#define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))

char *sparc_cpu_type = "cpu-oops";
char *sparc_fpu_type = "fpu-oops";
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/kernel/ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ 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 ARRAY_SIZE(sysio_irq_offsets)
#define NUM_SYSIO_OFFSETS (sizeof(sysio_irq_offsets) / sizeof(sysio_irq_offsets[0]))

/* Convert Interrupt Mapping register pointer to associated
* Interrupt Clear register pointer, SYSIO specific version.
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#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
6 changes: 3 additions & 3 deletions trunk/drivers/char/agp/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
return -ENOMEM;
}
flush_agp_mappings();
global_flush_tlb();

bridge->scratch_page_real = virt_to_gart(addr);
bridge->scratch_page =
Expand Down Expand Up @@ -191,7 +191,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
if (bridge->driver->needs_scratch_page) {
bridge->driver->agp_destroy_page(
gart_to_virt(bridge->scratch_page_real));
flush_agp_mappings();
global_flush_tlb();
}
if (got_gatt)
bridge->driver->free_gatt_table(bridge);
Expand All @@ -217,7 +217,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
bridge->driver->needs_scratch_page) {
bridge->driver->agp_destroy_page(
gart_to_virt(bridge->scratch_page_real));
flush_agp_mappings();
global_flush_tlb();
}
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/char/agp/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void agp_free_memory(struct agp_memory *curr)
for (i = 0; i < curr->page_count; i++) {
curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
}
flush_agp_mappings();
global_flush_tlb();
}
agp_free_key(curr->key);
vfree(curr->memory);
Expand Down Expand Up @@ -213,6 +213,8 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
new->memory[i] = virt_to_gart(addr);
new->page_count++;
}
global_flush_tlb();

new->bridge = bridge;

flush_agp_mappings();
Expand Down
16 changes: 12 additions & 4 deletions trunk/drivers/hwmon/w83627hf.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ superio_exit(void)
#define W83781D_REG_BANK 0x4E

#define W83781D_REG_CONFIG 0x40
#define W83781D_REG_ALARM1 0x459
#define W83781D_REG_ALARM2 0x45A
#define W83781D_REG_ALARM3 0x45B
#define W83781D_REG_ALARM1 0x41
#define W83781D_REG_ALARM2 0x42
#define W83781D_REG_ALARM3 0x450

#define W83781D_REG_IRQ 0x4C
#define W83781D_REG_BEEP_CONFIG 0x4D
#define W83781D_REG_BEEP_INTS1 0x56
#define W83781D_REG_BEEP_INTS2 0x57
Expand Down Expand Up @@ -1369,6 +1370,13 @@ static void w83627hf_init_client(struct i2c_client *client)
W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);
}
}

/* enable comparator mode for temp2 and temp3 so
alarm indication will work correctly */
i = w83627hf_read_value(client, W83781D_REG_IRQ);
if (!(i & 0x40))
w83627hf_write_value(client, W83781D_REG_IRQ,
i | 0x40);
}

/* Start monitoring */
Expand All @@ -1392,7 +1400,7 @@ static struct w83627hf_data *w83627hf_update_device(struct device *dev)
/* skip missing sensors */
if (((data->type == w83697hf) && (i == 1)) ||
((data->type == w83627thf || data->type == w83637hf)
&& (i == 5 || i == 6)))
&& (i == 4 || i == 5)))
continue;
data->in[i] =
w83627hf_read_value(client, W83781D_REG_IN(i));
Expand Down
27 changes: 13 additions & 14 deletions trunk/drivers/i2c/busses/i2c-viapro.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,19 @@ static int vt596_transaction(u8 size)
/* Make sure the SMBus host is ready to start transmitting */
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "
"Resetting...\n", temp);
"Resetting... ", temp);

outb_p(temp, SMBHSTSTS);
if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {
dev_err(&vt596_adapter.dev, "SMBus reset failed! "
"(0x%02x)\n", temp);
printk("Failed! (0x%02x)\n", temp);
return -1;
} else {
printk("Successful!\n");
}
}

/* Start the transaction by setting bit 6 */
outb_p(0x40 | size, SMBHSTCNT);
outb_p(0x40 | (size & 0x3C), SMBHSTCNT);

/* We will always wait for a fraction of a second */
do {
Expand All @@ -170,7 +171,7 @@ static int vt596_transaction(u8 size)
if (temp & 0x10) {
result = -1;
dev_err(&vt596_adapter.dev, "Transaction failed (0x%02x)\n",
size);
inb_p(SMBHSTCNT) & 0x3C);
}

if (temp & 0x08) {
Expand All @@ -179,13 +180,11 @@ static int vt596_transaction(u8 size)
}

if (temp & 0x04) {
int read = inb_p(SMBHSTADD) & 0x01;
result = -1;
/* The quick and receive byte commands are used to probe
for chips, so errors are expected, and we don't want
to frighten the user. */
if (!((size == VT596_QUICK && !read) ||
(size == VT596_BYTE && read)))
/* Quick commands are used to probe for chips, so
errors are expected, and we don't want to frighten the
user. */
if ((inb_p(SMBHSTCNT) & 0x3C) != VT596_QUICK)
dev_err(&vt596_adapter.dev, "Transaction error!\n");
}

Expand Down Expand Up @@ -463,9 +462,9 @@ static void __exit i2c_vt596_exit(void)
}
}

MODULE_AUTHOR("Kyosti Malkki <kmalkki@cc.hut.fi>, "
"Mark D. Studebaker <mdsxyz123@yahoo.com> and "
"Jean Delvare <khali@linux-fr.org>");
MODULE_AUTHOR(
"Frodo Looijaard <frodol@dds.nl> and "
"Philip Edelbrock <phil@netroedge.com>");
MODULE_DESCRIPTION("vt82c596 SMBus driver");
MODULE_LICENSE("GPL");

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/i2c/chips/ds1337.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ static int ds1337_set_datetime(struct i2c_client *client, struct rtc_time *dt)
buf[1] = BIN2BCD(dt->tm_sec);
buf[2] = BIN2BCD(dt->tm_min);
buf[3] = BIN2BCD(dt->tm_hour);
buf[4] = BIN2BCD(dt->tm_wday + 1);
buf[4] = BIN2BCD(dt->tm_wday) + 1;
buf[5] = BIN2BCD(dt->tm_mday);
buf[6] = BIN2BCD(dt->tm_mon + 1);
buf[6] = BIN2BCD(dt->tm_mon) + 1;
val = dt->tm_year;
if (val >= 100) {
val -= 100;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ int ide_register_hw_with_fixup(hw_regs_t *hw, ide_hwif_t **hwifp, void(*fixup)(i
hwif->irq = hw->irq;
hwif->noprobe = 0;
hwif->chipset = hw->chipset;
hwif->gendev.parent = hw->dev;

if (!initializing) {
probe_hwif_init_with_fixup(hwif, fixup);
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/ide/legacy/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,14 @@ static void ide_detach(dev_link_t *link)

} /* ide_detach */

static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq, struct pcmcia_device *handle)
{
hw_regs_t hw;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, io, ctl, NULL);
hw.irq = irq;
hw.chipset = ide_pci;
hw.dev = &handle->dev;
return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
}

Expand Down Expand Up @@ -327,12 +328,12 @@ static void ide_config(dev_link_t *link)

/* retry registration in case device is still spinning up */
for (hd = -1, i = 0; i < 10; i++) {
hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ);
hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, handle);
if (hd >= 0) break;
if (link->io.NumPorts1 == 0x20) {
outb(0x02, ctl_base + 0x10);
hd = idecs_register(io_base + 0x10, ctl_base + 0x10,
link->irq.AssignedIRQ);
link->irq.AssignedIRQ, handle);
if (hd >= 0) {
io_base += 0x10;
ctl_base += 0x10;
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);
unlock_kernel();
lock_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;
};
unlock_kernel();
lock_kernel();

return error;
}
Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/sbus/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,27 +210,6 @@ 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 @@ -258,7 +237,6 @@ 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
Loading

0 comments on commit 9147244

Please sign in to comment.