Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20281
b: refs/heads/master
c: e3efa5a
h: refs/heads/master
i:
  20279: d39435d
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Feb 14, 2006
1 parent 6916279 commit b200b52
Show file tree
Hide file tree
Showing 30 changed files with 328 additions and 444 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: 18539966bc1d663eb232877bb3e9e7dca67e89e6
refs/heads/master: e3efa5a7392e07471b5d0ef7e7cd7ab862f70284
5 changes: 0 additions & 5 deletions trunk/arch/i386/kernel/timers/timer_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
if (val != CPUFREQ_RESUMECHANGE)
write_seqlock_irq(&xtime_lock);
if (!ref_freq) {
if (!freq->old){
ref_freq = freq->new;
goto end;
}
ref_freq = freq->old;
loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy;
#ifndef CONFIG_SMP
Expand All @@ -311,7 +307,6 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
#endif
}

end:
if (val != CPUFREQ_RESUMECHANGE)
write_sequnlock_irq(&xtime_lock);

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/parisc/kernel/syscall_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,15 @@
ENTRY_SAME(inotify_init)
ENTRY_SAME(inotify_add_watch) /* 270 */
ENTRY_SAME(inotify_rm_watch)
ENTRY_SAME(ni_syscall) /* 271 ENTRY_COMP(pselect6) */
ENTRY_SAME(ni_syscall) /* 272 ENTRY_COMP(ppoll) */
ENTRY_COMP(pselect6)
ENTRY_COMP(ppoll)
ENTRY_SAME(migrate_pages)
ENTRY_COMP(openat) /* 275 */
ENTRY_SAME(mkdirat)
ENTRY_SAME(mknodat)
ENTRY_SAME(fchownat)
ENTRY_COMP(futimesat)
ENTRY_SAME(fstatat64) /* 280 */
ENTRY_COMP(newfstatat) /* 280 */
ENTRY_SAME(unlinkat)
ENTRY_SAME(renameat)
ENTRY_SAME(linkat)
Expand Down
17 changes: 13 additions & 4 deletions trunk/drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,18 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
/* ======================== Card services HCI interaction ======================== */


static struct device *bt3c_device(void)
{
static struct device dev = {
.bus_id = "pcmcia",
};
kobject_set_name(&dev.kobj, "bt3c");
kobject_init(&dev.kobj);

return &dev;
}


static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int count)
{
char *ptr = (char *) firmware;
Expand Down Expand Up @@ -562,7 +574,6 @@ static int bt3c_open(bt3c_info_t *info)
{
const struct firmware *firmware;
struct hci_dev *hdev;
client_handle_t handle;
int err;

spin_lock_init(&(info->lock));
Expand Down Expand Up @@ -594,10 +605,8 @@ static int bt3c_open(bt3c_info_t *info)

hdev->owner = THIS_MODULE;

handle = info->link.handle;

/* Load firmware */
err = request_firmware(&firmware, "BT3CPCC.bin", &handle_to_dev(handle));
err = request_firmware(&firmware, "BT3CPCC.bin", bt3c_device());
if (err < 0) {
BT_ERR("Firmware request failed");
goto error;
Expand Down
110 changes: 54 additions & 56 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
* level driver of CPUFreq support, and its spinlock. This lock
* also protects the cpufreq_cpu_data array.
*/
static struct cpufreq_driver *cpufreq_driver;
static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS];
static struct cpufreq_driver *cpufreq_driver;
static struct cpufreq_policy *cpufreq_cpu_data[NR_CPUS];
static DEFINE_SPINLOCK(cpufreq_driver_lock);

/* internal prototypes */
Expand All @@ -50,15 +50,15 @@ static void handle_update(void *data);
* changes to devices when the CPU clock speed changes.
* The mutex locks both lists.
*/
static struct notifier_block *cpufreq_policy_notifier_list;
static struct notifier_block *cpufreq_transition_notifier_list;
static DECLARE_RWSEM (cpufreq_notifier_rwsem);
static struct notifier_block *cpufreq_policy_notifier_list;
static struct notifier_block *cpufreq_transition_notifier_list;
static DECLARE_RWSEM (cpufreq_notifier_rwsem);


static LIST_HEAD(cpufreq_governor_list);
static DEFINE_MUTEX (cpufreq_governor_mutex);
static DEFINE_MUTEX (cpufreq_governor_mutex);

struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
struct cpufreq_policy * cpufreq_cpu_get(unsigned int cpu)
{
struct cpufreq_policy *data;
unsigned long flags;
Expand All @@ -85,19 +85,20 @@ struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu)
if (!kobject_get(&data->kobj))
goto err_out_put_module;


spin_unlock_irqrestore(&cpufreq_driver_lock, flags);

return data;

err_out_put_module:
err_out_put_module:
module_put(cpufreq_driver->owner);
err_out_unlock:
err_out_unlock:
spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
err_out:
err_out:
return NULL;
}
EXPORT_SYMBOL_GPL(cpufreq_cpu_get);


void cpufreq_cpu_put(struct cpufreq_policy *data)
{
kobject_put(&data->kobj);
Expand Down Expand Up @@ -228,53 +229,44 @@ static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci) {


/**
* cpufreq_notify_transition - call notifier chain and adjust_jiffies
* on frequency transition.
* cpufreq_notify_transition - call notifier chain and adjust_jiffies on frequency transition
*
* This function calls the transition notifiers and the "adjust_jiffies"
* function. It is called twice on all CPU frequency changes that have
* external effects.
* This function calls the transition notifiers and the "adjust_jiffies" function. It is called
* twice on all CPU frequency changes that have external effects.
*/
void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state)
{
struct cpufreq_policy *policy;

BUG_ON(irqs_disabled());

freqs->flags = cpufreq_driver->flags;
dprintk("notification %u of frequency transition to %u kHz\n",
state, freqs->new);
dprintk("notification %u of frequency transition to %u kHz\n", state, freqs->new);

down_read(&cpufreq_notifier_rwsem);

policy = cpufreq_cpu_data[freqs->cpu];
switch (state) {

case CPUFREQ_PRECHANGE:
/* detect if the driver reported a value as "old frequency"
* which is not equal to what the cpufreq core thinks is
* "old frequency".
/* detect if the driver reported a value as "old frequency" which
* is not equal to what the cpufreq core thinks is "old frequency".
*/
if (!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
if ((policy) && (policy->cpu == freqs->cpu) &&
(policy->cur) && (policy->cur != freqs->old)) {
dprintk(KERN_WARNING "Warning: CPU frequency is"
" %u, cpufreq assumed %u kHz.\n",
freqs->old, policy->cur);
freqs->old = policy->cur;
if ((likely(cpufreq_cpu_data[freqs->cpu])) &&
(likely(cpufreq_cpu_data[freqs->cpu]->cpu == freqs->cpu)) &&
(likely(cpufreq_cpu_data[freqs->cpu]->cur)) &&
(unlikely(freqs->old != cpufreq_cpu_data[freqs->cpu]->cur)))
{
dprintk(KERN_WARNING "Warning: CPU frequency is %u, "
"cpufreq assumed %u kHz.\n", freqs->old, cpufreq_cpu_data[freqs->cpu]->cur);
freqs->old = cpufreq_cpu_data[freqs->cpu]->cur;
}
}
notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_PRECHANGE, freqs);
notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_PRECHANGE, freqs);
adjust_jiffies(CPUFREQ_PRECHANGE, freqs);
break;

case CPUFREQ_POSTCHANGE:
adjust_jiffies(CPUFREQ_POSTCHANGE, freqs);
notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_POSTCHANGE, freqs);
if (likely(policy) && likely(policy->cpu == freqs->cpu))
policy->cur = freqs->new;
notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_POSTCHANGE, freqs);
if ((likely(cpufreq_cpu_data[freqs->cpu])) &&
(likely(cpufreq_cpu_data[freqs->cpu]->cpu == freqs->cpu)))
cpufreq_cpu_data[freqs->cpu]->cur = freqs->new;
break;
}
up_read(&cpufreq_notifier_rwsem);
Expand Down Expand Up @@ -316,7 +308,7 @@ static int cpufreq_parse_governor (char *str_governor, unsigned int *policy,
return 0;
}
}
out:
out:
mutex_unlock(&cpufreq_governor_mutex);
}
return -EINVAL;
Expand Down Expand Up @@ -423,6 +415,7 @@ static ssize_t store_scaling_governor (struct cpufreq_policy * policy,
return -EINVAL;

ret = cpufreq_set_policy(&new_policy);

return ret ? ret : count;
}

Expand Down Expand Up @@ -453,7 +446,7 @@ static ssize_t show_scaling_available_governors (struct cpufreq_policy * policy,
goto out;
i += scnprintf(&buf[i], CPUFREQ_NAME_LEN, "%s ", t->name);
}
out:
out:
i += sprintf(&buf[i], "\n");
return i;
}
Expand Down Expand Up @@ -796,6 +789,7 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
kfree(data);

cpufreq_debug_enable_ratelimit();

return 0;
}

Expand Down Expand Up @@ -876,7 +870,8 @@ unsigned int cpufreq_get(unsigned int cpu)

ret = cpufreq_driver->get(cpu);

if (ret && policy->cur && !(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
if (ret && policy->cur && !(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS))
{
/* verify no discrepancy between actual and saved value exists */
if (unlikely(ret != policy->cur)) {
cpufreq_out_of_sync(cpu, policy->cur, ret);
Expand All @@ -886,7 +881,7 @@ unsigned int cpufreq_get(unsigned int cpu)

mutex_unlock(&policy->lock);

out:
out:
cpufreq_cpu_put(policy);

return (ret);
Expand Down Expand Up @@ -967,7 +962,7 @@ static int cpufreq_suspend(struct sys_device * sysdev, pm_message_t pmsg)
cpu_policy->cur = cur_freq;
}

out:
out:
cpufreq_cpu_put(cpu_policy);
return 0;
}
Expand Down Expand Up @@ -1174,6 +1169,7 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
mutex_unlock(&policy->lock);

cpufreq_cpu_put(policy);

return ret;
}
EXPORT_SYMBOL_GPL(cpufreq_driver_target);
Expand Down Expand Up @@ -1212,6 +1208,7 @@ int cpufreq_governor(unsigned int cpu, unsigned int event)
mutex_unlock(&policy->lock);

cpufreq_cpu_put(policy);

return ret;
}
EXPORT_SYMBOL_GPL(cpufreq_governor);
Expand All @@ -1235,6 +1232,7 @@ int cpufreq_register_governor(struct cpufreq_governor *governor)
list_add(&governor->governor_list, &cpufreq_governor_list);

mutex_unlock(&cpufreq_governor_mutex);

return 0;
}
EXPORT_SYMBOL_GPL(cpufreq_register_governor);
Expand Down Expand Up @@ -1279,6 +1277,7 @@ int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu)
mutex_unlock(&cpu_policy->lock);

cpufreq_cpu_put(cpu_policy);

return 0;
}
EXPORT_SYMBOL(cpufreq_get_policy);
Expand All @@ -1292,7 +1291,9 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli
dprintk("setting new policy for CPU %u: %u - %u kHz\n", policy->cpu,
policy->min, policy->max);

memcpy(&policy->cpuinfo, &data->cpuinfo, sizeof(struct cpufreq_cpuinfo));
memcpy(&policy->cpuinfo,
&data->cpuinfo,
sizeof(struct cpufreq_cpuinfo));

/* verify the cpu speed can be set within this limit */
ret = cpufreq_driver->verify(policy);
Expand Down Expand Up @@ -1323,8 +1324,8 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli

up_read(&cpufreq_notifier_rwsem);

data->min = policy->min;
data->max = policy->max;
data->min = policy->min;
data->max = policy->max;

dprintk("new min and max freqs are %u - %u kHz\n", data->min, data->max);

Expand Down Expand Up @@ -1361,7 +1362,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data, struct cpufreq_poli
__cpufreq_governor(data, CPUFREQ_GOV_LIMITS);
}

error_out:
error_out:
cpufreq_debug_enable_ratelimit();
return ret;
}
Expand Down Expand Up @@ -1420,7 +1421,9 @@ int cpufreq_update_policy(unsigned int cpu)
mutex_lock(&data->lock);

dprintk("updating policy for CPU %u\n", cpu);
memcpy(&policy, data, sizeof(struct cpufreq_policy));
memcpy(&policy,
data,
sizeof(struct cpufreq_policy));
policy.min = data->user_policy.min;
policy.max = data->user_policy.max;
policy.policy = data->user_policy.policy;
Expand All @@ -1430,13 +1433,8 @@ int cpufreq_update_policy(unsigned int cpu)
-> ask driver for current freq and notify governors about a change */
if (cpufreq_driver->get) {
policy.cur = cpufreq_driver->get(cpu);
if (!data->cur) {
dprintk("Driver did not initialize current freq");
data->cur = policy.cur;
} else {
if (data->cur != policy.cur)
cpufreq_out_of_sync(cpu, data->cur, policy.cur);
}
if (data->cur != policy.cur)
cpufreq_out_of_sync(cpu, data->cur, policy.cur);
}

ret = __cpufreq_set_policy(data, &policy);
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/hwmon/vt8231.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,12 +437,12 @@ static SENSOR_DEVICE_ATTR(temp##offset##_input, S_IRUGO, \
show_temp, NULL, offset - 1); \
static SENSOR_DEVICE_ATTR(temp##offset##_max, S_IRUGO | S_IWUSR, \
show_temp_max, set_temp_max, offset - 1); \
static SENSOR_DEVICE_ATTR(temp##offset##_min, S_IRUGO | S_IWUSR, \
static SENSOR_DEVICE_ATTR(temp##offset##_max_hyst, S_IRUGO | S_IWUSR, \
show_temp_min, set_temp_min, offset - 1)

static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp0, NULL);
static DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR, show_temp0_max, set_temp0_max);
static DEVICE_ATTR(temp1_min, S_IRUGO | S_IWUSR, show_temp0_min, set_temp0_min);
static DEVICE_ATTR(temp1_max_hyst, S_IRUGO | S_IWUSR, show_temp0_min, set_temp0_min);

define_temperature_sysfs(2);
define_temperature_sysfs(3);
Expand All @@ -451,7 +451,7 @@ define_temperature_sysfs(5);
define_temperature_sysfs(6);

#define CFG_INFO_TEMP(id) { &sensor_dev_attr_temp##id##_input.dev_attr, \
&sensor_dev_attr_temp##id##_min.dev_attr, \
&sensor_dev_attr_temp##id##_max_hyst.dev_attr, \
&sensor_dev_attr_temp##id##_max.dev_attr }
#define CFG_INFO_VOLT(id) { &sensor_dev_attr_in##id##_input.dev_attr, \
&sensor_dev_attr_in##id##_min.dev_attr, \
Expand All @@ -464,7 +464,7 @@ struct str_device_attr_table {
};

static struct str_device_attr_table cfg_info_temp[] = {
{ &dev_attr_temp1_input, &dev_attr_temp1_min, &dev_attr_temp1_max },
{ &dev_attr_temp1_input, &dev_attr_temp1_max_hyst, &dev_attr_temp1_max },
CFG_INFO_TEMP(2),
CFG_INFO_TEMP(3),
CFG_INFO_TEMP(4),
Expand Down
Loading

0 comments on commit b200b52

Please sign in to comment.