The patch titled cpufreq: handle sysfs errors has been removed from the -mm tree. Its filename was cpufreq-handle-sysfs-errors.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ Subject: cpufreq: handle sysfs errors From: Jeff Garzik <jeff@xxxxxxxxxx> Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx> Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/cpufreq/cpufreq_conservative.c | 10 +++++++++- drivers/cpufreq/cpufreq_ondemand.c | 12 +++++++++++- drivers/cpufreq/cpufreq_userspace.c | 11 +++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff -puN drivers/cpufreq/cpufreq_conservative.c~cpufreq-handle-sysfs-errors drivers/cpufreq/cpufreq_conservative.c --- a/drivers/cpufreq/cpufreq_conservative.c~cpufreq-handle-sysfs-errors +++ a/drivers/cpufreq/cpufreq_conservative.c @@ -453,6 +453,7 @@ static int cpufreq_governor_dbs(struct c unsigned int cpu = policy->cpu; struct cpu_dbs_info_s *this_dbs_info; unsigned int j; + int rc; this_dbs_info = &per_cpu(cpu_dbs_info, cpu); @@ -469,6 +470,13 @@ static int cpufreq_governor_dbs(struct c break; mutex_lock(&dbs_mutex); + + rc = sysfs_create_group(&policy->kobj, &dbs_attr_group); + if (rc) { + mutex_unlock(&dbs_mutex); + return rc; + } + for_each_cpu_mask(j, policy->cpus) { struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu(cpu_dbs_info, j); @@ -481,7 +489,7 @@ static int cpufreq_governor_dbs(struct c this_dbs_info->enable = 1; this_dbs_info->down_skip = 0; this_dbs_info->requested_freq = policy->cur; - sysfs_create_group(&policy->kobj, &dbs_attr_group); + dbs_enable++; /* * Start the timerschedule work, when this governor diff -puN drivers/cpufreq/cpufreq_ondemand.c~cpufreq-handle-sysfs-errors drivers/cpufreq/cpufreq_ondemand.c --- a/drivers/cpufreq/cpufreq_ondemand.c~cpufreq-handle-sysfs-errors +++ a/drivers/cpufreq/cpufreq_ondemand.c @@ -473,6 +473,7 @@ static int cpufreq_governor_dbs(struct c unsigned int cpu = policy->cpu; struct cpu_dbs_info_s *this_dbs_info; unsigned int j; + int rc; this_dbs_info = &per_cpu(cpu_dbs_info, cpu); @@ -501,6 +502,16 @@ static int cpufreq_governor_dbs(struct c return -ENOSPC; } } + + rc = sysfs_create_group(&policy->kobj, &dbs_attr_group); + if (rc) { + if (dbs_enable == 1) + destroy_workqueue(kondemand_wq); + dbs_enable--; + mutex_unlock(&dbs_mutex); + return rc; + } + for_each_cpu_mask(j, policy->cpus) { struct cpu_dbs_info_s *j_dbs_info; j_dbs_info = &per_cpu(cpu_dbs_info, j); @@ -510,7 +521,6 @@ static int cpufreq_governor_dbs(struct c j_dbs_info->prev_cpu_wall = get_jiffies_64(); } this_dbs_info->enable = 1; - sysfs_create_group(&policy->kobj, &dbs_attr_group); /* * Start the timerschedule work, when this governor * is used for first time diff -puN drivers/cpufreq/cpufreq_userspace.c~cpufreq-handle-sysfs-errors drivers/cpufreq/cpufreq_userspace.c --- a/drivers/cpufreq/cpufreq_userspace.c~cpufreq-handle-sysfs-errors +++ a/drivers/cpufreq/cpufreq_userspace.c @@ -131,19 +131,26 @@ static int cpufreq_governor_userspace(st unsigned int event) { unsigned int cpu = policy->cpu; + int rc = 0; + switch (event) { case CPUFREQ_GOV_START: if (!cpu_online(cpu)) return -EINVAL; BUG_ON(!policy->cur); mutex_lock(&userspace_mutex); + rc = sysfs_create_file (&policy->kobj, + &freq_attr_scaling_setspeed.attr); + if (rc) + goto start_out; + cpu_is_managed[cpu] = 1; cpu_min_freq[cpu] = policy->min; cpu_max_freq[cpu] = policy->max; cpu_cur_freq[cpu] = policy->cur; cpu_set_freq[cpu] = policy->cur; - sysfs_create_file (&policy->kobj, &freq_attr_scaling_setspeed.attr); dprintk("managing cpu %u started (%u - %u kHz, currently %u kHz)\n", cpu, cpu_min_freq[cpu], cpu_max_freq[cpu], cpu_cur_freq[cpu]); +start_out: mutex_unlock(&userspace_mutex); break; case CPUFREQ_GOV_STOP: @@ -180,7 +187,7 @@ static int cpufreq_governor_userspace(st mutex_unlock(&userspace_mutex); break; } - return 0; + return rc; } _ Patches currently in -mm which might be from jeff@xxxxxxxxxx are origin.patch ibmveth-fix-index-increment-calculation.patch git-acpi.patch git-cpufreq.patch drm-fix-error-returns-sysfs-error-handling.patch git-dvb.patch input-handle-sysfs-errors.patch input-drivers-handle-sysfs-errors.patch git-libata-all.patch ata-must-depend-on-block.patch ahci-readability-tweak.patch libata-sff-allow-for-wacky-systems.patch libata-revamp-blacklist-support-to-allow-multiple-kinds.patch pata_marvell-marvell-6101-6145-pata-driver.patch via-pata-controller-xfer-fixes.patch ahci-ati-sb600-sata-support-for-various-modes.patch git-mtd.patch git-netdev-all.patch libphy-dont-do-that.patch update-smc91x-driver-with-arm-versatile-board-info.patch 8139too-force-media-setting-fix.patch tulip-fix-shutdown-dma-irq-race.patch git-net.patch wan-pc300-handle-propagate-minor-errors.patch git-ioat.patch pcmcia-handle-sysfs-pci-errors.patch r8169-driver-corega-support-patch.patch serial-handle-pci_enable_device-failure-upon-resume.patch git-pciseg.patch scsi-minor-bug-fixes-and-cleanups.patch mpt-fusion-handle-pci-layer-error-on-resume.patch scsi-aha1740-handle-scsi-api-errors.patch scsi-qla2xxx-handle-sysfs-errors.patch git-watchdog.patch git-wireless.patch i2o-more-error-checking.patch pnp-handle-sysfs-errors.patch rtc-handle-sysfs-errors.patch sound-oss-emu10k1-handle-userspace-copy-errors.patch spi-improve-sysfs-compiler-complaint-handling.patch remove-double-cast-to-same-type.patch via82cxxx-handle-error-condition-properly.patch atyfb-rivafb-minor-fixes.patch md-conditionalize-some-code.patch user-of-the-jiffies-rounding-patch-ata-subsystem.patch git-gccbug.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html