Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157124
b: refs/heads/master
c: 7b6a09f
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Benjamin Herrenschmidt committed Aug 27, 2009
1 parent fddb9c3 commit f096302
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 121 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: 5311034ddda7aad48934520d3536b9d0e4502672
refs/heads/master: 7b6a09f3d6aedeaac923824af2a5df30300b56e9
6 changes: 2 additions & 4 deletions trunk/arch/m68k/amiga/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,10 @@ static int a2000_hwclk(int op, struct rtc_time *t)

tod_2000.cntrl1 = TOD2000_CNTRL1_HOLD;

while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) {
while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) {
tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
udelay(70);
tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;
--cnt;
}

if (!cnt)
Expand Down Expand Up @@ -650,11 +649,10 @@ static int amiga_set_clock_mmss(unsigned long nowtime)

tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;

while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt) {
while ((tod_2000.cntrl1 & TOD2000_CNTRL1_BUSY) && cnt--) {
tod_2000.cntrl1 &= ~TOD2000_CNTRL1_HOLD;
udelay(70);
tod_2000.cntrl1 |= TOD2000_CNTRL1_HOLD;
--cnt;
}

if (!cnt)
Expand Down
10 changes: 6 additions & 4 deletions trunk/arch/m68k/include/asm/motorola_pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addres
return NULL;

pte = kmap(page);
__flush_page_to_ram(pte);
flush_tlb_kernel_page(pte);
nocache_page(pte);
kunmap(page);
if (pte) {
__flush_page_to_ram(pte);
flush_tlb_kernel_page(pte);
nocache_page(pte);
}
kunmap(pte);
pgtable_page_ctor(page);
return page;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/m68k/include/asm/pgtable_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
#endif

#ifndef __ASSEMBLY__
#include <asm-generic/pgtable.h>

/*
* Macro to mark a page protection value as "uncacheable".
*/
Expand All @@ -152,7 +154,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma,
? (__pgprot((pgprot_val(prot) & _CACHEMASK040) | _PAGE_NOCACHE_S)) \
: (prot)))

#include <asm-generic/pgtable.h>
#endif /* !__ASSEMBLY__ */

/*
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/m68k/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,10 @@
#define __NR_inotify_init1 328
#define __NR_preadv 329
#define __NR_pwritev 330
#define __NR_rt_tgsigqueueinfo 331
#define __NR_perf_counter_open 332

#ifdef __KERNEL__

#define NR_syscalls 333
#define NR_syscalls 331

#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/m68k/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,4 @@ sys_call_table:
.long sys_inotify_init1
.long sys_preadv
.long sys_pwritev /* 330 */
.long sys_rt_tgsigqueueinfo
.long sys_perf_counter_open

2 changes: 0 additions & 2 deletions trunk/arch/m68knommu/kernel/syscalltable.S
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ ENTRY(sys_call_table)
.long sys_inotify_init1
.long sys_preadv
.long sys_pwritev /* 330 */
.long sys_rt_tgsigqueueinfo
.long sys_perf_counter_open

.rept NR_syscalls-(.-sys_call_table)/4
.long sys_ni_syscall
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/platforms/ps3/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>

#include <asm/firmware.h>
#include <asm/rtc.h>
#include <asm/lv1call.h>
#include <asm/ps3.h>
Expand Down Expand Up @@ -84,6 +85,9 @@ static int __init ps3_rtc_init(void)
{
struct platform_device *pdev;

if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
return -ENODEV;

pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,9 +1151,6 @@ static int __init acpi_processor_init(void)
{
int result = 0;

if (acpi_disabled)
return 0;

memset(&errata, 0, sizeof(errata));

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -1200,9 +1197,6 @@ static int __init acpi_processor_init(void)

static void __exit acpi_processor_exit(void)
{
if (acpi_disabled)
return;

acpi_processor_ppc_exit();

acpi_thermal_cpufreq_exit();
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/processor_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr)
if (pr->limit.thermal.tx > tx)
tx = pr->limit.thermal.tx;

result = acpi_processor_set_throttling(pr, tx, false);
result = acpi_processor_set_throttling(pr, tx);
if (result)
goto end;
}
Expand Down Expand Up @@ -421,12 +421,12 @@ processor_set_cur_state(struct thermal_cooling_device *cdev,

if (state <= max_pstate) {
if (pr->flags.throttling && pr->throttling.state)
result = acpi_processor_set_throttling(pr, 0, false);
result = acpi_processor_set_throttling(pr, 0);
cpufreq_set_cur_state(pr->id, state);
} else {
cpufreq_set_cur_state(pr->id, max_pstate);
result = acpi_processor_set_throttling(pr,
state - max_pstate, false);
state - max_pstate);
}
return result;
}
Expand Down
30 changes: 14 additions & 16 deletions trunk/drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ struct throttling_tstate {
#define THROTTLING_POSTCHANGE (2)

static int acpi_processor_get_throttling(struct acpi_processor *pr);
int acpi_processor_set_throttling(struct acpi_processor *pr,
int state, bool force);
int acpi_processor_set_throttling(struct acpi_processor *pr, int state);

static int acpi_processor_update_tsd_coord(void)
{
Expand Down Expand Up @@ -362,7 +361,7 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
*/
target_state = throttling_limit;
}
return acpi_processor_set_throttling(pr, target_state, false);
return acpi_processor_set_throttling(pr, target_state);
}

/*
Expand Down Expand Up @@ -840,10 +839,10 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
if (ret >= 0) {
state = acpi_get_throttling_state(pr, value);
if (state == -1) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Invalid throttling state, reset\n"));
ACPI_WARNING((AE_INFO,
"Invalid throttling state, reset"));
state = 0;
ret = acpi_processor_set_throttling(pr, state, true);
ret = acpi_processor_set_throttling(pr, state);
if (ret)
return ret;
}
Expand Down Expand Up @@ -916,7 +915,7 @@ static int acpi_processor_get_fadt_info(struct acpi_processor *pr)
}

static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr,
int state, bool force)
int state)
{
u32 value = 0;
u32 duty_mask = 0;
Expand All @@ -931,7 +930,7 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr,
if (!pr->flags.throttling)
return -ENODEV;

if (!force && (state == pr->throttling.state))
if (state == pr->throttling.state)
return 0;

if (state < pr->throttling_platform_limit)
Expand Down Expand Up @@ -989,7 +988,7 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr,
}

static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
int state, bool force)
int state)
{
int ret;
acpi_integer value;
Expand All @@ -1003,7 +1002,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
if (!pr->flags.throttling)
return -ENODEV;

if (!force && (state == pr->throttling.state))
if (state == pr->throttling.state)
return 0;

if (state < pr->throttling_platform_limit)
Expand All @@ -1019,8 +1018,7 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
return 0;
}

int acpi_processor_set_throttling(struct acpi_processor *pr,
int state, bool force)
int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
{
cpumask_var_t saved_mask;
int ret = 0;
Expand Down Expand Up @@ -1072,7 +1070,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
/* FIXME: use work_on_cpu() */
set_cpus_allowed_ptr(current, cpumask_of(pr->id));
ret = p_throttling->acpi_processor_set_throttling(pr,
t_state.target_state, force);
t_state.target_state);
} else {
/*
* When the T-state coordination is SW_ALL or HW_ALL,
Expand Down Expand Up @@ -1105,7 +1103,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
set_cpus_allowed_ptr(current, cpumask_of(i));
ret = match_pr->throttling.
acpi_processor_set_throttling(
match_pr, t_state.target_state, force);
match_pr, t_state.target_state);
}
}
/*
Expand Down Expand Up @@ -1203,7 +1201,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Disabling throttling (was T%d)\n",
pr->throttling.state));
result = acpi_processor_set_throttling(pr, 0, false);
result = acpi_processor_set_throttling(pr, 0);
if (result)
goto end;
}
Expand Down Expand Up @@ -1309,7 +1307,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file,
if (strcmp(tmpbuf, charp) != 0)
return -EINVAL;

result = acpi_processor_set_throttling(pr, state_val, false);
result = acpi_processor_set_throttling(pr, state_val);
if (result)
return result;

Expand Down
24 changes: 7 additions & 17 deletions trunk/drivers/leds/ledtrig-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ static ssize_t gpio_trig_inverted_store(struct device *dev,

gpio_data->inverted = !!inverted;

/* After inverting, we need to update the LED. */
schedule_work(&gpio_data->work);

return n;
}
static DEVICE_ATTR(inverted, 0644, gpio_trig_inverted_show,
Expand Down Expand Up @@ -149,26 +146,20 @@ static ssize_t gpio_trig_gpio_store(struct device *dev,
return -EINVAL;
}

if (gpio_data->gpio == gpio)
return n;

if (!gpio) {
if (gpio_data->gpio != 0)
free_irq(gpio_to_irq(gpio_data->gpio), led);
gpio_data->gpio = 0;
free_irq(gpio_to_irq(gpio_data->gpio), led);
return n;
}

if (gpio_data->gpio > 0 && gpio_data->gpio != gpio)
free_irq(gpio_to_irq(gpio_data->gpio), led);

gpio_data->gpio = gpio;
ret = request_irq(gpio_to_irq(gpio), gpio_trig_irq,
IRQF_SHARED | IRQF_TRIGGER_RISING
| IRQF_TRIGGER_FALLING, "ledtrig-gpio", led);
if (ret) {
if (ret)
dev_err(dev, "request_irq failed with error %d\n", ret);
} else {
if (gpio_data->gpio != 0)
free_irq(gpio_to_irq(gpio_data->gpio), led);
gpio_data->gpio = gpio;
}

return ret ? ret : n;
}
Expand Down Expand Up @@ -220,8 +211,7 @@ static void gpio_trig_deactivate(struct led_classdev *led)
device_remove_file(led->dev, &dev_attr_inverted);
device_remove_file(led->dev, &dev_attr_desired_brightness);
flush_work(&gpio_data->work);
if (gpio_data->gpio != 0)
free_irq(gpio_to_irq(gpio_data->gpio), led);
free_irq(gpio_to_irq(gpio_data->gpio),led);
kfree(gpio_data);
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/macintosh/via-maciisi.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ static void maciisi_sync(struct adb_request *req)
}
/* This could be BAD... when the ADB controller doesn't respond
* for this long, it's probably not coming back :-( */
if (count > 50) /* Hopefully shouldn't happen */
if(count >= 50) /* Hopefully shouldn't happen */
printk(KERN_ERR "maciisi_send_request: poll timed out!\n");
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ u32 method_id, const struct acpi_buffer *in, struct acpi_buffer *out)
acpi_status status;
struct acpi_object_list input;
union acpi_object params[3];
char method[5] = "WM";
char method[4] = "WM";

if (!find_guid(guid_string, &wblock))
return AE_ERROR;
Expand Down Expand Up @@ -328,8 +328,8 @@ struct acpi_buffer *out)
acpi_status status, wc_status = AE_ERROR;
struct acpi_object_list input, wc_input;
union acpi_object wc_params[1], wq_params[1];
char method[5];
char wc_method[5] = "WC";
char method[4];
char wc_method[4] = "WC";

if (!guid_string || !out)
return AE_BAD_PARAMETER;
Expand Down Expand Up @@ -410,7 +410,7 @@ const struct acpi_buffer *in)
acpi_handle handle;
struct acpi_object_list input;
union acpi_object params[2];
char method[5] = "WS";
char method[4] = "WS";

if (!guid_string || !in)
return AE_BAD_DATA;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pps/pps.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ int pps_register_cdev(struct pps_device *pps)
}
pps->dev = device_create(pps_class, pps->info.dev, pps->devno, NULL,
"pps%d", pps->id);
if (IS_ERR(pps->dev))
if (err)
goto del_cdev;
dev_set_drvdata(pps->dev, pps);

Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,12 +953,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)

mutex_lock(&tz->lock);

if (tz->ops->get_temp(tz, &temp)) {
/* get_temp failed - retry it later */
printk(KERN_WARNING PREFIX "failed to read out thermal zone "
"%d\n", tz->id);
goto leave;
}
tz->ops->get_temp(tz, &temp);

for (count = 0; count < tz->trips; count++) {
tz->ops->get_trip_type(tz, count, &trip_type);
Expand Down Expand Up @@ -1010,8 +1005,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
THERMAL_TRIPS_NONE);

tz->last_temperature = temp;

leave:
if (tz->passive)
thermal_zone_device_set_polling(tz, tz->passive_delay);
else if (tz->polling_delay)
Expand Down
Loading

0 comments on commit f096302

Please sign in to comment.