Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168293
b: refs/heads/master
c: 58ce48a
h: refs/heads/master
i:
  168291: ca2db83
v: v3
  • Loading branch information
Corentin Chary authored and Len Brown committed Nov 3, 2009
1 parent e1f919a commit a464594
Show file tree
Hide file tree
Showing 9 changed files with 212 additions and 240 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: 29226ed3c3b5cd0b2b0b1fb40ffeac3f796b80e9
refs/heads/master: 58ce48a9de1dd47acb5dc00e2837214d2be1d92a
389 changes: 188 additions & 201 deletions trunk/Documentation/thermal/sysfs-api.txt

Large diffs are not rendered by default.

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
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
27 changes: 8 additions & 19 deletions trunk/drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ 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 @@ -345,16 +343,7 @@ static bool eeepc_wlan_rfkill_blocked(void)
static int eeepc_rfkill_set(void *data, bool blocked)
{
unsigned long asl = (unsigned long)data;
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;
return set_acpi(asl, !blocked);
}

static const struct rfkill_ops eeepc_rfkill_ops = {
Expand Down Expand Up @@ -654,13 +643,13 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot,
return 0;
}

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

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

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

eeepc_rfkill_hotplug(true);
eeepc_rfkill_hotplug();
}

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

if (ehotk->bluetooth_rfkill)
rfkill_set_sw_state(ehotk->bluetooth_rfkill,
Expand Down Expand Up @@ -1004,7 +993,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(true);
eeepc_rfkill_hotplug();
if (ehotk->hotplug_slot)
pci_hp_deregister(ehotk->hotplug_slot);

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

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

0 comments on commit a464594

Please sign in to comment.