Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168315
b: refs/heads/master
c: a556bec
h: refs/heads/master
i:
  168313: 6e7f46d
  168311: f04137e
v: v3
  • Loading branch information
Hirokazu Takata committed Nov 9, 2009
1 parent b1a5d36 commit 3750596
Show file tree
Hide file tree
Showing 24 changed files with 249 additions and 383 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: d5d6eba94b4c390c29e375bacabf9fdc2f01243d
refs/heads/master: a556bec9955c8e47b40a87dbfeef6f24d3b2228f
389 changes: 188 additions & 201 deletions trunk/Documentation/thermal/sysfs-api.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions trunk/arch/m32r/boot/compressed/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# linux/arch/sh/boot/compressed/Makefile
# linux/arch/m32r/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
Expand Down Expand Up @@ -47,5 +47,5 @@ suffix_$(CONFIG_KERNEL_GZIP) = gz
suffix_$(CONFIG_KERNEL_BZIP2) = bz2
suffix_$(CONFIG_KERNEL_LZMA) = lzma

$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
$(call if_changed,ld)
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/acconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@

#define ACPI_MAX_REFERENCE_COUNT 0x1000

/* Default page size for use in mapping memory for operation regions */
/* Size of cached memory mapping for system memory operation region */

#define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */
#define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096

/* owner_id tracking. 8 entries allows for 255 owner_ids */

Expand Down
35 changes: 10 additions & 25 deletions trunk/drivers/acpi/acpica/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ acpi_ex_system_memory_space_handler(u32 function,
void *logical_addr_ptr = NULL;
struct acpi_mem_space_context *mem_info = region_context;
u32 length;
acpi_size map_length;
acpi_size page_boundary_map_length;
acpi_size window_size;
#ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
u32 remainder;
#endif
Expand Down Expand Up @@ -145,47 +144,33 @@ acpi_ex_system_memory_space_handler(u32 function,
}

/*
* Attempt to map from the requested address to the end of the region.
* However, we will never map more than one page, nor will we cross
* a page boundary.
* Don't attempt to map memory beyond the end of the region, and
* constrain the maximum mapping size to something reasonable.
*/
map_length = (acpi_size)
window_size = (acpi_size)
((mem_info->address + mem_info->length) - address);

/*
* If mapping the entire remaining portion of the region will cross
* a page boundary, just map up to the page boundary, do not cross.
* On some systems, crossing a page boundary while mapping regions
* can cause warnings if the pages have different attributes
* due to resource management
*/
page_boundary_map_length =
ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;

if (!page_boundary_map_length) {
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
}

if (map_length > page_boundary_map_length) {
map_length = page_boundary_map_length;
if (window_size > ACPI_SYSMEM_REGION_WINDOW_SIZE) {
window_size = ACPI_SYSMEM_REGION_WINDOW_SIZE;
}

/* Create a new mapping starting at the address given */

mem_info->mapped_logical_address = acpi_os_map_memory((acpi_physical_address) address, map_length);
mem_info->mapped_logical_address =
acpi_os_map_memory((acpi_physical_address) address, window_size);
if (!mem_info->mapped_logical_address) {
ACPI_ERROR((AE_INFO,
"Could not map memory at %8.8X%8.8X, size %X",
ACPI_FORMAT_NATIVE_UINT(address),
(u32) map_length));
(u32) window_size));
mem_info->mapped_length = 0;
return_ACPI_STATUS(AE_NO_MEMORY);
}

/* Save the physical address and mapping size */

mem_info->mapped_physical_address = address;
mem_info->mapped_length = map_length;
mem_info->mapped_length = window_size;
}

/*
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/acpi/power_meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,7 @@ static int set_acpi_trip(struct acpi_power_meter_resource *resource)
return -EINVAL;
}

/* _PTP returns 0 on success, nonzero otherwise */
if (data)
return -EINVAL;

return 0;
return data;
}

static ssize_t set_trip(struct device *dev, struct device_attribute *devattr,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ acpi_system_write_wakeup_device(struct file *file,
struct list_head *node, *next;
char strbuf[5];
char str[5] = "";
unsigned int len = count;
int len = count;
struct acpi_device *found_dev = NULL;

if (len > 4)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ static struct notifier_block acpi_cpu_notifier =
.notifier_call = acpi_cpu_soft_notify,
};

static int __cpuinit acpi_processor_add(struct acpi_device *device)
static int acpi_processor_add(struct acpi_device *device)
{
struct acpi_processor *pr = NULL;
int result = 0;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/processor_throttling.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,15 +1133,15 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
int result = 0;
struct acpi_processor_throttling *pthrottling;

if (!pr)
return -EINVAL;

ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
pr->throttling.address,
pr->throttling.duty_offset,
pr->throttling.duty_width));

if (!pr)
return -EINVAL;

/*
* Evaluate _PTC, _TSS and _TPC
* They must all be present or none of them can be used.
Expand Down
24 changes: 0 additions & 24 deletions trunk/drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,30 +413,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
},
},
{
.callback = init_set_sci_en_on_resume,
.ident = "Hewlett-Packard Pavilion dv4",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4"),
},
},
{
.callback = init_set_sci_en_on_resume,
.ident = "Hewlett-Packard Pavilion dv7",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv7"),
},
},
{
.callback = init_set_sci_en_on_resume,
.ident = "Hewlett-Packard Compaq Presario CQ40 Notebook PC",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "Compaq Presario CQ40 Notebook PC"),
},
},
{
.callback = init_old_suspend_ordering,
.ident = "Panasonic CF51-2L",
.matches = {
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ acpi_video_device_write_state(struct file *file,
u32 state = 0;


if (!dev || count >= sizeof(str))
if (!dev || count + 1 > sizeof str)
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down Expand Up @@ -1280,7 +1280,7 @@ acpi_video_device_write_brightness(struct file *file,
int i;


if (!dev || !dev->brightness || count >= sizeof(str))
if (!dev || !dev->brightness || count + 1 > sizeof str)
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down Expand Up @@ -1562,7 +1562,7 @@ acpi_video_bus_write_POST(struct file *file,
unsigned long long opt, options;


if (!video || count >= sizeof(str))
if (!video || count + 1 > sizeof str)
return -EINVAL;

status = acpi_video_bus_POST_options(video, &options);
Expand Down Expand Up @@ -1602,7 +1602,7 @@ acpi_video_bus_write_DOS(struct file *file,
unsigned long opt;


if (!video || count >= sizeof(str))
if (!video || count + 1 > sizeof str)
return -EINVAL;

if (copy_from_user(str, buffer, count))
Expand Down
30 changes: 20 additions & 10 deletions trunk/drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ struct eeepc_hotk {
/* The actual device the driver binds to */
static struct eeepc_hotk *ehotk;

static void eeepc_rfkill_hotplug(bool real);

/* Platform device/driver */
static int eeepc_hotk_thaw(struct device *device);
static int eeepc_hotk_restore(struct device *device);
Expand Down Expand Up @@ -343,7 +345,16 @@ static bool eeepc_wlan_rfkill_blocked(void)
static int eeepc_rfkill_set(void *data, bool blocked)
{
unsigned long asl = (unsigned long)data;
return set_acpi(asl, !blocked);
int ret;

if (asl != CM_ASL_WLAN)
return set_acpi(asl, !blocked);

/* hack to avoid panic with rt2860sta */
if (blocked)
eeepc_rfkill_hotplug(false);
ret = set_acpi(asl, !blocked);
return ret;
}

static const struct rfkill_ops eeepc_rfkill_ops = {
Expand All @@ -356,8 +367,7 @@ static void __devinit eeepc_enable_camera(void)
* If the following call to set_acpi() fails, it's because there's no
* camera so we can ignore the error.
*/
if (get_acpi(CM_ASL_CAMERA) == 0)
set_acpi(CM_ASL_CAMERA, 1);
set_acpi(CM_ASL_CAMERA, 1);
}

/*
Expand Down Expand Up @@ -644,13 +654,13 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot,
return 0;
}

static void eeepc_rfkill_hotplug(void)
static void eeepc_rfkill_hotplug(bool real)
{
struct pci_dev *dev;
struct pci_bus *bus;
bool blocked = eeepc_wlan_rfkill_blocked();
bool blocked = real ? eeepc_wlan_rfkill_blocked() : true;

if (ehotk->wlan_rfkill)
if (real && ehotk->wlan_rfkill)
rfkill_set_sw_state(ehotk->wlan_rfkill, blocked);

mutex_lock(&ehotk->hotplug_lock);
Expand Down Expand Up @@ -693,7 +703,7 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
if (event != ACPI_NOTIFY_BUS_CHECK)
return;

eeepc_rfkill_hotplug();
eeepc_rfkill_hotplug(true);
}

static void eeepc_hotk_notify(struct acpi_device *device, u32 event)
Expand Down Expand Up @@ -851,7 +861,7 @@ static int eeepc_hotk_restore(struct device *device)
{
/* Refresh both wlan rfkill state and pci hotplug */
if (ehotk->wlan_rfkill)
eeepc_rfkill_hotplug();
eeepc_rfkill_hotplug(true);

if (ehotk->bluetooth_rfkill)
rfkill_set_sw_state(ehotk->bluetooth_rfkill,
Expand Down Expand Up @@ -994,7 +1004,7 @@ static void eeepc_rfkill_exit(void)
* Refresh pci hotplug in case the rfkill state was changed after
* eeepc_unregister_rfkill_notifier()
*/
eeepc_rfkill_hotplug();
eeepc_rfkill_hotplug(true);
if (ehotk->hotplug_slot)
pci_hp_deregister(ehotk->hotplug_slot);

Expand Down Expand Up @@ -1110,7 +1120,7 @@ static int eeepc_rfkill_init(struct device *dev)
* Refresh pci hotplug in case the rfkill state was changed during
* setup.
*/
eeepc_rfkill_hotplug();
eeepc_rfkill_hotplug(true);

exit:
if (result && result != -ENODEV)
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ trip_point_type_show(struct device *dev, struct device_attribute *attr,

switch (type) {
case THERMAL_TRIP_CRITICAL:
return sprintf(buf, "critical\n");
return sprintf(buf, "critical");
case THERMAL_TRIP_HOT:
return sprintf(buf, "hot\n");
return sprintf(buf, "hot");
case THERMAL_TRIP_PASSIVE:
return sprintf(buf, "passive\n");
return sprintf(buf, "passive");
case THERMAL_TRIP_ACTIVE:
return sprintf(buf, "active\n");
return sprintf(buf, "active");
default:
return sprintf(buf, "unknown\n");
return sprintf(buf, "unknown");
}
}

Expand Down
4 changes: 1 addition & 3 deletions trunk/sound/oss/dmasound/dmasound_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ static int shared_resources_initialised;
* Mid level stuff
*/

struct sound_settings dmasound = {
.lock = __SPIN_LOCK_UNLOCKED(dmasound.lock)
};
struct sound_settings dmasound = { .lock = SPIN_LOCK_UNLOCKED };

static inline void sound_silence(void)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/oss/sb_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static void sb_intr (sb_devc *devc)
break;

default:
/* printk(KERN_WARNING "Sound Blaster: Unexpected interrupt\n"); */
/* printk(KERN_WARN "Sound Blaster: Unexpected interrupt\n"); */
;
}
}
Expand All @@ -177,7 +177,7 @@ static void sb_intr (sb_devc *devc)
break;

default:
/* printk(KERN_WARNING "Sound Blaster: Unexpected interrupt\n"); */
/* printk(KERN_WARN "Sound Blaster: Unexpected interrupt\n"); */
;
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/oss/sb_ess.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ printk(KERN_INFO "FKS: ess_handle_channel %s irq_mode=%d\n", channel, irq_mode);
break;

default:;
/* printk(KERN_WARNING "ESS: Unexpected interrupt\n"); */
/* printk(KERN_WARN "ESS: Unexpected interrupt\n"); */
}
}

Expand Down
12 changes: 4 additions & 8 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,9 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus,
chip->last_cmd[addr]);
chip->single_cmd = 1;
bus->response_reset = 0;
/* release CORB/RIRB */
/* re-initialize CORB/RIRB */
azx_free_cmd_io(chip);
/* disable unsolicited responses */
azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_UNSOL);
azx_init_cmd_io(chip);
return -1;
}

Expand Down Expand Up @@ -866,9 +865,7 @@ static int azx_reset(struct azx *chip)
}

/* Accept unsolicited responses */
if (!chip->single_cmd)
azx_writel(chip, GCTL, azx_readl(chip, GCTL) |
ICH6_GCTL_UNSOL);
azx_writel(chip, GCTL, azx_readl(chip, GCTL) | ICH6_GCTL_UNSOL);

/* detect codecs */
if (!chip->codec_mask) {
Expand Down Expand Up @@ -983,8 +980,7 @@ static void azx_init_chip(struct azx *chip)
azx_int_enable(chip);

/* initialize the codec command I/O */
if (!chip->single_cmd)
azx_init_cmd_io(chip);
azx_init_cmd_io(chip);

/* program the position buffer */
azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
Expand Down
Loading

0 comments on commit 3750596

Please sign in to comment.