Skip to content

Commit

Permalink
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/gregkh/driver-core

* 'driver-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (73 commits)
  arm: fix up some samsung merge sysdev conversion problems
  firmware: Fix an oops on reading fw_priv->fw in sysfs loading file
  Drivers:hv: Fix a bug in vmbus_driver_unregister()
  driver core: remove __must_check from device_create_file
  debugfs: add missing #ifdef HAS_IOMEM
  arm: time.h: remove device.h #include
  driver-core: remove sysdev.h usage.
  clockevents: remove sysdev.h
  arm: convert sysdev_class to a regular subsystem
  arm: leds: convert sysdev_class to a regular subsystem
  kobject: remove kset_find_obj_hinted()
  m86k: gpio - convert sysdev_class to a regular subsystem
  mips: txx9_sram - convert sysdev_class to a regular subsystem
  mips: 7segled - convert sysdev_class to a regular subsystem
  sh: dma - convert sysdev_class to a regular subsystem
  sh: intc - convert sysdev_class to a regular subsystem
  power: suspend - convert sysdev_class to a regular subsystem
  power: qe_ic - convert sysdev_class to a regular subsystem
  power: cmm - convert sysdev_class to a regular subsystem
  s390: time - convert sysdev_class to a regular subsystem
  ...

Fix up conflicts with 'struct sysdev' removal from various platform
drivers that got changed:
 - arch/arm/mach-exynos/cpu.c
 - arch/arm/mach-exynos/irq-eint.c
 - arch/arm/mach-s3c64xx/common.c
 - arch/arm/mach-s3c64xx/cpu.c
 - arch/arm/mach-s5p64x0/cpu.c
 - arch/arm/mach-s5pv210/common.c
 - arch/arm/plat-samsung/include/plat/cpu.h
 - arch/powerpc/kernel/sysfs.c
and fix up cpu_is_hotpluggable() as per Greg in include/linux/cpu.h
  • Loading branch information
torvalds committed Jan 7, 2012
2 parents 356b954 + ff4b8a5 commit 7affca3
Show file tree
Hide file tree
Showing 517 changed files with 3,169 additions and 6,891 deletions.
4 changes: 2 additions & 2 deletions Documentation/HOWTO
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ versions.
If no 2.6.x.y kernel is available, then the highest numbered 2.6.x
kernel is the current stable kernel.

2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are
released as needs dictate. The normal release period is approximately
2.6.x.y are maintained by the "stable" team <stable@vger.kernel.org>, and
are released as needs dictate. The normal release period is approximately
two weeks, but it can be longer if there are no pressing problems. A
security-related problem, instead, can cause a release to happen almost
instantly.
Expand Down
8 changes: 4 additions & 4 deletions Documentation/development-process/5.Posting
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ copies should go to:
the linux-kernel list.

- If you are fixing a bug, think about whether the fix should go into the
next stable update. If so, stable@kernel.org should get a copy of the
patch. Also add a "Cc: stable@kernel.org" to the tags within the patch
itself; that will cause the stable team to get a notification when your
fix goes into the mainline.
next stable update. If so, stable@vger.kernel.org should get a copy of
the patch. Also add a "Cc: stable@vger.kernel.org" to the tags within
the patch itself; that will cause the stable team to get a notification
when your fix goes into the mainline.

When selecting recipients for a patch, it is good to have an idea of who
you think will eventually accept the patch and get it merged. While it
Expand Down
1 change: 1 addition & 0 deletions Documentation/driver-model/devres.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ IOMAP
devm_ioremap()
devm_ioremap_nocache()
devm_iounmap()
devm_request_and_ioremap() : checks resource, requests region, ioremaps
pcim_iomap()
pcim_iounmap()
pcim_iomap_table() : array of mapped addresses indexed by BAR
Expand Down
32 changes: 31 additions & 1 deletion Documentation/filesystems/debugfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ A read on the resulting file will yield either Y (for non-zero values) or
N, followed by a newline. If written to, it will accept either upper- or
lower-case values, or 1 or 0. Any other input will be silently ignored.

Finally, a block of arbitrary binary data can be exported with:
Another option is exporting a block of arbitrary binary data, with
this structure and function:

struct debugfs_blob_wrapper {
void *data;
Expand All @@ -115,6 +116,35 @@ can be used to export binary information, but there does not appear to be
any code which does so in the mainline. Note that all files created with
debugfs_create_blob() are read-only.

If you want to dump a block of registers (something that happens quite
often during development, even if little such code reaches mainline.
Debugfs offers two functions: one to make a registers-only file, and
another to insert a register block in the middle of another sequential
file.

struct debugfs_reg32 {
char *name;
unsigned long offset;
};

struct debugfs_regset32 {
struct debugfs_reg32 *regs;
int nregs;
void __iomem *base;
};

struct dentry *debugfs_create_regset32(const char *name, mode_t mode,
struct dentry *parent,
struct debugfs_regset32 *regset);

int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs,
int nregs, void __iomem *base, char *prefix);

The "base" argument may be 0, but you may want to build the reg32 array
using __stringify, and a number of register names (macros) are actually
byte offsets over a base for the register block.


There are a couple of other directory-oriented helper functions:

struct dentry *debugfs_rename(struct dentry *old_dir,
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -6259,7 +6259,7 @@ F: arch/alpha/kernel/srm_env.c

STABLE BRANCH
M: Greg Kroah-Hartman <greg@kroah.com>
L: stable@kernel.org
L: stable@vger.kernel.org
S: Maintained

STAGING SUBSYSTEM
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/include/asm/mach/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef __ASM_ARM_MACH_TIME_H
#define __ASM_ARM_MACH_TIME_H

#include <linux/sysdev.h>

/*
* This is our kernel timer structure.
*
Expand Down
21 changes: 11 additions & 10 deletions arch/arm/kernel/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
#include <linux/export.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/string.h>

Expand All @@ -34,8 +34,8 @@ static const struct leds_evt_name evt_names[] = {
{ "red", led_red_on, led_red_off },
};

static ssize_t leds_store(struct sys_device *dev,
struct sysdev_attribute *attr,
static ssize_t leds_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
int ret = -EINVAL, len = strcspn(buf, " ");
Expand Down Expand Up @@ -69,15 +69,16 @@ static ssize_t leds_store(struct sys_device *dev,
return ret;
}

static SYSDEV_ATTR(event, 0200, NULL, leds_store);
static DEVICE_ATTR(event, 0200, NULL, leds_store);

static struct sysdev_class leds_sysclass = {
static struct bus_type leds_subsys = {
.name = "leds",
.dev_name = "leds",
};

static struct sys_device leds_device = {
static struct device leds_device = {
.id = 0,
.cls = &leds_sysclass,
.bus = &leds_subsys,
};

static int leds_suspend(void)
Expand Down Expand Up @@ -105,11 +106,11 @@ static struct syscore_ops leds_syscore_ops = {
static int __init leds_init(void)
{
int ret;
ret = sysdev_class_register(&leds_sysclass);
ret = subsys_system_register(&leds_subsys, NULL);
if (ret == 0)
ret = sysdev_register(&leds_device);
ret = device_register(&leds_device);
if (ret == 0)
ret = sysdev_create_file(&leds_device, &attr_event);
ret = device_create_file(&leds_device, &dev_attr_event);
if (ret == 0)
register_syscore_ops(&leds_syscore_ops);
return ret;
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-bcmring/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/interrupt.h>
#include <linux/amba/bus.h>
#include <linux/clkdev.h>
Expand Down
15 changes: 8 additions & 7 deletions arch/arm/mach-exynos/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/gpio.h>
#include <linux/sched.h>
#include <linux/serial_core.h>
Expand Down Expand Up @@ -423,17 +423,18 @@ void __init exynos4_init_irq(void)
s5p_init_irq(NULL, 0);
}

struct sysdev_class exynos4_sysclass = {
.name = "exynos4-core",
struct bus_type exynos4_subsys = {
.name = "exynos4-core",
.dev_name = "exynos4-core",
};

static struct sys_device exynos4_sysdev = {
.cls = &exynos4_sysclass,
static struct device exynos4_dev = {
.bus = &exynos4_subsys,
};

static int __init exynos4_core_init(void)
{
return sysdev_class_register(&exynos4_sysclass);
return subsys_system_register(&exynos4_subsys, NULL);
}
core_initcall(exynos4_core_init);

Expand Down Expand Up @@ -470,7 +471,7 @@ int __init exynos_init(void)
/* set idle function */
pm_idle = exynos_idle;

return sysdev_register(&exynos4_sysdev);
return device_register(&exynos4_dev);
}

static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = {
Expand Down
10 changes: 6 additions & 4 deletions arch/arm/mach-exynos/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static void exynos4_pm_prepare(void)

}

static int exynos4_pm_add(struct sys_device *sysdev)
static int exynos4_pm_add(struct device *dev)
{
pm_cpu_prep = exynos4_pm_prepare;
pm_cpu_sleep = exynos4_cpu_suspend;
Expand Down Expand Up @@ -301,8 +301,10 @@ static void exynos4_restore_pll(void)
} while (epll_wait || vpll_wait);
}

static struct sysdev_driver exynos4_pm_driver = {
.add = exynos4_pm_add,
static struct subsys_interface exynos4_pm_interface = {
.name = "exynos4_pm",
.subsys = &exynos4_subsys,
.add_dev = exynos4_pm_add,
};

static __init int exynos4_pm_drvinit(void)
Expand All @@ -325,7 +327,7 @@ static __init int exynos4_pm_drvinit(void)
clk_put(pll_base);
}

return sysdev_driver_register(&exynos4_sysclass, &exynos4_pm_driver);
return subsys_interface_register(&exynos4_pm_interface);
}
arch_initcall(exynos4_pm_drvinit);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-integrator/integrator_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/string.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/kmi.h>
#include <linux/amba/clcd.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ks8695/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>

#include <mach/hardware.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-lpc32xx/phy3250.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/dma-mapping.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-msm/board-sapphire.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sysdev.h>
#include <linux/device.h>

#include <linux/delay.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/amba/bus.h>
#include <linux/amba/clcd.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/realview_eb.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/realview_pb1176.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/realview_pb11mp.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/realview_pba8.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/realview_pbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/bast-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>

#include <asm/mach-types.h>
Expand Down
26 changes: 14 additions & 12 deletions arch/arm/mach-s3c2410/cpu-freq.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
Expand Down Expand Up @@ -115,24 +115,25 @@ static struct s3c_cpufreq_info s3c2410_cpufreq_info = {
.debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs),
};

static int s3c2410_cpufreq_add(struct sys_device *sysdev)
static int s3c2410_cpufreq_add(struct device *dev)
{
return s3c_cpufreq_register(&s3c2410_cpufreq_info);
}

static struct sysdev_driver s3c2410_cpufreq_driver = {
.add = s3c2410_cpufreq_add,
static struct subsys_interface s3c2410_cpufreq_interface = {
.name = "s3c2410_cpufreq",
.subsys = &s3c2410_subsys,
.add_dev = s3c2410_cpufreq_add,
};

static int __init s3c2410_cpufreq_init(void)
{
return sysdev_driver_register(&s3c2410_sysclass,
&s3c2410_cpufreq_driver);
return subsys_interface_register(&s3c2410_cpufreq_interface);
}

arch_initcall(s3c2410_cpufreq_init);

static int s3c2410a_cpufreq_add(struct sys_device *sysdev)
static int s3c2410a_cpufreq_add(struct device *dev)
{
/* alter the maximum freq settings for S3C2410A. If a board knows
* it only has a maximum of 200, then it should register its own
Expand All @@ -143,17 +144,18 @@ static int s3c2410a_cpufreq_add(struct sys_device *sysdev)
s3c2410_cpufreq_info.max.pclk = 66500000;
s3c2410_cpufreq_info.name = "s3c2410a";

return s3c2410_cpufreq_add(sysdev);
return s3c2410_cpufreq_add(dev);
}

static struct sysdev_driver s3c2410a_cpufreq_driver = {
.add = s3c2410a_cpufreq_add,
static struct subsys_interface s3c2410a_cpufreq_interface = {
.name = "s3c2410a_cpufreq",
.subsys = &s3c2410a_subsys,
.add_dev = s3c2410a_cpufreq_add,
};

static int __init s3c2410a_cpufreq_init(void)
{
return sysdev_driver_register(&s3c2410a_sysclass,
&s3c2410a_cpufreq_driver);
return subsys_interface_register(&s3c2410a_cpufreq_interface);
}

arch_initcall(s3c2410a_cpufreq_init);
Loading

0 comments on commit 7affca3

Please sign in to comment.