Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223406
b: refs/heads/master
c: 8251544
h: refs/heads/master
v: v3
  • Loading branch information
Ryan Mallon authored and Nicolas Ferre committed Dec 17, 2010
1 parent cac2c77 commit 87e9d66
Show file tree
Hide file tree
Showing 55 changed files with 349 additions and 468 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: a6ac1f0af4b39f41fa69477cc44621c612403374
refs/heads/master: 8251544f9e28058e54c4f35b7cd13b0d191d7555
4 changes: 2 additions & 2 deletions trunk/Documentation/power/runtime_pm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
zero)

bool pm_runtime_suspended(struct device *dev);
- return true if the device's runtime PM status is 'suspended' and its
'power.disable_depth' field is equal to zero, or false otherwise
- return true if the device's runtime PM status is 'suspended', or false
otherwise

void pm_runtime_allow(struct device *dev);
- set the power.runtime_auto flag for the device and decrease its usage
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-at91/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static void __init at91_upll_usbfs_clock_init(unsigned long main_clock)
/* Now set uhpck values */
uhpck.parent = &utmi_clk;
uhpck.pmc_mask = AT91SAM926x_PMC_UHP;
uhpck.rate_hz = utmi_clk.parent->rate_hz;
uhpck.rate_hz = utmi_clk.rate_hz;
uhpck.rate_hz /= 1 + ((at91_sys_read(AT91_PMC_USB) & AT91_PMC_OHCIUSBDIV) >> 8);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
#define KVM_NUM_MMU_PAGES (1 << KVM_MMU_HASH_SHIFT)
#define KVM_MIN_FREE_MMU_PAGES 5
#define KVM_REFILL_PAGES 25
#define KVM_MAX_CPUID_ENTRIES 80
#define KVM_MAX_CPUID_ENTRIES 40
#define KVM_NR_FIXED_MTRR_REGION 88
#define KVM_NR_VAR_MTRR 8

Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3494,10 +3494,6 @@ static void svm_cpuid_update(struct kvm_vcpu *vcpu)
static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
{
switch (func) {
case 0x00000001:
/* Mask out xsave bit as long as it is not supported by SVM */
entry->ecx &= ~(bit(X86_FEATURE_XSAVE));
break;
case 0x80000001:
if (nested)
entry->ecx |= (1 << 2); /* Set SVM bit */
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4227,6 +4227,11 @@ static int vmx_get_lpage_level(void)
return PT_PDPE_LEVEL;
}

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
{
struct kvm_cpuid_entry2 *best;
Expand Down
11 changes: 6 additions & 5 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {

u64 __read_mostly host_xcr0;

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

static void kvm_on_user_return(struct user_return_notifier *urn)
{
unsigned slot;
Expand Down Expand Up @@ -4564,11 +4569,9 @@ static void kvm_timer_init(void)
#ifdef CONFIG_CPU_FREQ
struct cpufreq_policy policy;
memset(&policy, 0, sizeof(policy));
cpu = get_cpu();
cpufreq_get_policy(&policy, cpu);
cpufreq_get_policy(&policy, get_cpu());
if (policy.cpuinfo.max_freq)
max_tsc_khz = policy.cpuinfo.max_freq;
put_cpu();
#endif
cpufreq_register_notifier(&kvmclock_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
Expand Down Expand Up @@ -5519,8 +5522,6 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,

mmu_reset_needed |= kvm_read_cr4(vcpu) != sregs->cr4;
kvm_x86_ops->set_cr4(vcpu, sregs->cr4);
if (sregs->cr4 & X86_CR4_OSXSAVE)
update_cpuid(vcpu);
if (!is_long_mode(vcpu) && is_pae(vcpu)) {
load_pdptrs(vcpu, vcpu->arch.walk_mmu, vcpu->arch.cr3);
mmu_reset_needed = 1;
Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/kvm/x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ static inline int is_paging(struct kvm_vcpu *vcpu)
return kvm_read_cr0_bits(vcpu, X86_CR0_PG);
}

static inline u32 bit(int bitno)
{
return 1 << (bitno & 31);
}

void kvm_before_handle_nmi(struct kvm_vcpu *vcpu);
void kvm_after_handle_nmi(struct kvm_vcpu *vcpu);
int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq);
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/media/radio/radio-aimslab.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static int vidioc_s_audio(struct file *file, void *priv,

static const struct v4l2_file_operations rtrack_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
Expand Down Expand Up @@ -412,6 +412,13 @@ static int __init rtrack_init(void)
rt->vdev.release = video_device_release_empty;
video_set_drvdata(&rt->vdev, rt);

if (video_register_device(&rt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(&rt->v4l2_dev);
release_region(rt->io, 2);
return -EINVAL;
}
v4l2_info(v4l2_dev, "AIMSlab RadioTrack/RadioReveal card driver.\n");

/* Set up the I/O locking */

mutex_init(&rt->lock);
Expand All @@ -423,13 +430,6 @@ static int __init rtrack_init(void)
sleep_delay(2000000); /* make sure it's totally down */
outb(0xc0, rt->io); /* steady volume, mute card */

if (video_register_device(&rt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(&rt->v4l2_dev);
release_region(rt->io, 2);
return -EINVAL;
}
v4l2_info(v4l2_dev, "AIMSlab RadioTrack/RadioReveal card driver.\n");

return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/radio/radio-aztech.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,

static const struct v4l2_file_operations aztech_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
Expand Down Expand Up @@ -375,8 +375,6 @@ static int __init aztech_init(void)
az->vdev.ioctl_ops = &aztech_ioctl_ops;
az->vdev.release = video_device_release_empty;
video_set_drvdata(&az->vdev, az);
/* mute card - prevents noisy bootups */
outb(0, az->io);

if (video_register_device(&az->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(v4l2_dev);
Expand All @@ -385,6 +383,8 @@ static int __init aztech_init(void)
}

v4l2_info(v4l2_dev, "Aztech radio card driver v1.00/19990224 rkroll@exploits.org\n");
/* mute card - prevents noisy bootups */
outb(0, az->io);
return 0;
}

Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/media/radio/radio-cadet.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,26 +328,24 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
unsigned char readbuf[RDS_BUFFER];
int i = 0;

mutex_lock(&dev->lock);
if (dev->rdsstat == 0) {
mutex_lock(&dev->lock);
dev->rdsstat = 1;
outb(0x80, dev->io); /* Select RDS fifo */
mutex_unlock(&dev->lock);
init_timer(&dev->readtimer);
dev->readtimer.function = cadet_handler;
dev->readtimer.data = (unsigned long)dev;
dev->readtimer.expires = jiffies + msecs_to_jiffies(50);
add_timer(&dev->readtimer);
}
if (dev->rdsin == dev->rdsout) {
mutex_unlock(&dev->lock);
if (file->f_flags & O_NONBLOCK)
return -EWOULDBLOCK;
interruptible_sleep_on(&dev->read_queue);
mutex_lock(&dev->lock);
}
while (i < count && dev->rdsin != dev->rdsout)
readbuf[i++] = dev->rdsbuf[dev->rdsout++];
mutex_unlock(&dev->lock);

if (copy_to_user(data, readbuf, i))
return -EFAULT;
Expand Down Expand Up @@ -527,25 +525,21 @@ static int cadet_open(struct file *file)
{
struct cadet *dev = video_drvdata(file);

mutex_lock(&dev->lock);
dev->users++;
if (1 == dev->users)
init_waitqueue_head(&dev->read_queue);
mutex_unlock(&dev->lock);
return 0;
}

static int cadet_release(struct file *file)
{
struct cadet *dev = video_drvdata(file);

mutex_lock(&dev->lock);
dev->users--;
if (0 == dev->users) {
del_timer_sync(&dev->readtimer);
dev->rdsstat = 0;
}
mutex_unlock(&dev->lock);
return 0;
}

Expand All @@ -565,7 +559,7 @@ static const struct v4l2_file_operations cadet_fops = {
.open = cadet_open,
.release = cadet_release,
.read = cadet_read,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
.poll = cadet_poll,
};

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/media/radio/radio-gemtek-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ MODULE_DEVICE_TABLE(pci, gemtek_pci_id);

static const struct v4l2_file_operations gemtek_pci_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
Expand Down Expand Up @@ -422,11 +422,11 @@ static int __devinit gemtek_pci_probe(struct pci_dev *pdev, const struct pci_dev
card->vdev.release = video_device_release_empty;
video_set_drvdata(&card->vdev, card);

gemtek_pci_mute(card);

if (video_register_device(&card->vdev, VFL_TYPE_RADIO, nr_radio) < 0)
goto err_video;

gemtek_pci_mute(card);

v4l2_info(v4l2_dev, "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n",
pdev->revision, card->iobase, card->iobase + card->length - 1);

Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/media/radio/radio-gemtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static int gemtek_probe(struct gemtek *gt)

static const struct v4l2_file_operations gemtek_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static int vidioc_querycap(struct file *file, void *priv,
Expand Down Expand Up @@ -577,19 +577,19 @@ static int __init gemtek_init(void)
gt->vdev.release = video_device_release_empty;
video_set_drvdata(&gt->vdev, gt);

if (video_register_device(&gt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(v4l2_dev);
release_region(gt->io, 1);
return -EBUSY;
}

/* Set defaults */
gt->lastfreq = GEMTEK_LOWFREQ;
gt->bu2614data = 0;

if (initmute)
gemtek_mute(gt);

if (video_register_device(&gt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(v4l2_dev);
release_region(gt->io, 1);
return -EBUSY;
}

return 0;
}

Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/media/radio/radio-maestro.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int vidioc_s_audio(struct file *file, void *priv,

static const struct v4l2_file_operations maestro_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops maestro_ioctl_ops = {
Expand Down Expand Up @@ -383,20 +383,22 @@ static int __devinit maestro_probe(struct pci_dev *pdev,
dev->vdev.release = video_device_release_empty;
video_set_drvdata(&dev->vdev, dev);

if (!radio_power_on(dev)) {
retval = -EIO;
goto errfr1;
}

retval = video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr);
if (retval) {
v4l2_err(v4l2_dev, "can't register video device!\n");
goto errfr1;
}

if (!radio_power_on(dev)) {
retval = -EIO;
goto errunr;
}

v4l2_info(v4l2_dev, "version " DRIVER_VERSION "\n");

return 0;
errunr:
video_unregister_device(&dev->vdev);
errfr1:
v4l2_device_unregister(v4l2_dev);
errfr:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/radio/radio-maxiradio.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,

static const struct v4l2_file_operations maxiradio_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops maxiradio_ioctl_ops = {
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/media/radio/radio-miropcm20.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ struct pcm20 {
unsigned long freq;
int muted;
struct snd_miro_aci *aci;
struct mutex lock;
};

static struct pcm20 pcm20_card = {
Expand Down Expand Up @@ -73,7 +72,7 @@ static int pcm20_setfreq(struct pcm20 *dev, unsigned long freq)

static const struct v4l2_file_operations pcm20_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static int vidioc_querycap(struct file *file, void *priv,
Expand Down Expand Up @@ -230,7 +229,7 @@ static int __init pcm20_init(void)
return -ENODEV;
}
strlcpy(v4l2_dev->name, "miropcm20", sizeof(v4l2_dev->name));
mutex_init(&dev->lock);


res = v4l2_device_register(NULL, v4l2_dev);
if (res < 0) {
Expand All @@ -243,7 +242,6 @@ static int __init pcm20_init(void)
dev->vdev.fops = &pcm20_fops;
dev->vdev.ioctl_ops = &pcm20_ioctl_ops;
dev->vdev.release = video_device_release_empty;
dev->vdev.lock = &dev->lock;
video_set_drvdata(&dev->vdev, dev);

if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0)
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/media/radio/radio-rtrack2.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int vidioc_s_audio(struct file *file, void *priv,

static const struct v4l2_file_operations rtrack2_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = video_ioctl2,
.ioctl = video_ioctl2,
};

static const struct v4l2_ioctl_ops rtrack2_ioctl_ops = {
Expand Down Expand Up @@ -315,10 +315,6 @@ static int __init rtrack2_init(void)
dev->vdev.release = video_device_release_empty;
video_set_drvdata(&dev->vdev, dev);

/* mute card - prevents noisy bootups */
outb(1, dev->io);
dev->muted = 1;

mutex_init(&dev->lock);
if (video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
v4l2_device_unregister(v4l2_dev);
Expand All @@ -328,6 +324,10 @@ static int __init rtrack2_init(void)

v4l2_info(v4l2_dev, "AIMSlab Radiotrack II card driver.\n");

/* mute card - prevents noisy bootups */
outb(1, dev->io);
dev->muted = 1;

return 0;
}

Expand Down
Loading

0 comments on commit 87e9d66

Please sign in to comment.