Merge branch 'driver-core-next' into Linux 3.2

This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file,
and it fixes the build error in the arch/x86/kernel/microcode_core.c
file, that the merge did not catch.

The microcode_core.c patch was provided by Stephen Rothwell
<sfr@canb.auug.org.au> who was invaluable in the merge issues involved
with the large sysdev removal process in the driver-core tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman 2012-01-06 11:42:52 -08:00
commit ff4b8a57f0
518 changed files with 3167 additions and 6887 deletions

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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;
@ -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,

View file

@ -6258,7 +6258,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

View file

@ -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.
*

View file

@ -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>
@ -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, " ");
@ -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)
@ -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;

View file

@ -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>

View file

@ -9,7 +9,7 @@
*/
#include <linux/sched.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
@ -238,17 +238,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);
@ -289,5 +290,5 @@ int __init exynos_init(void)
if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412())
s5p_reset_hook = exynos4_sw_reset;
return sysdev_register(&exynos4_sysdev);
return device_register(&exynos4_dev);
}

View file

@ -14,7 +14,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 <plat/pm.h>

View file

@ -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;
@ -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)
@ -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);

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>
@ -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
@ -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);

View file

@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <mach/map.h>
@ -132,7 +132,7 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = {
},
};
static int __init s3c2410_dma_add(struct sys_device *sysdev)
static int __init s3c2410_dma_add(struct device *dev)
{
s3c2410_dma_init();
s3c24xx_dma_order_set(&s3c2410_dma_order);
@ -140,24 +140,28 @@ static int __init s3c2410_dma_add(struct sys_device *sysdev)
}
#if defined(CONFIG_CPU_S3C2410)
static struct sysdev_driver s3c2410_dma_driver = {
.add = s3c2410_dma_add,
static struct subsys_interface s3c2410_dma_interface = {
.name = "s3c2410_dma",
.subsys = &s3c2410_subsys,
.add_dev = s3c2410_dma_add,
};
static int __init s3c2410_dma_drvinit(void)
{
return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_dma_driver);
return subsys_interface_register(&s3c2410_interface);
}
arch_initcall(s3c2410_dma_drvinit);
static struct sysdev_driver s3c2410a_dma_driver = {
.add = s3c2410_dma_add,
static struct subsys_interface s3c2410a_dma_interface = {
.name = "s3c2410a_dma",
.subsys = &s3c2410a_subsys,
.add_dev = s3c2410_dma_add,
};
static int __init s3c2410a_dma_drvinit(void)
{
return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_dma_driver);
return subsys_interface_register(&s3c2410a_dma_interface);
}
arch_initcall(s3c2410a_dma_drvinit);
@ -165,13 +169,15 @@ arch_initcall(s3c2410a_dma_drvinit);
#if defined(CONFIG_CPU_S3C2442)
/* S3C2442 DMA contains the same selection table as the S3C2410 */
static struct sysdev_driver s3c2442_dma_driver = {
.add = s3c2410_dma_add,
static struct subsys_interface s3c2442_dma_interface = {
.name = "s3c2442_dma",
.subsys = &s3c2442_subsys,
.add_dev = s3c2410_dma_add,
};
static int __init s3c2442_dma_drvinit(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_dma_driver);
return subsys_interface_register(&s3c2442_dma_interface);
}
arch_initcall(s3c2442_dma_drvinit);

View file

@ -13,7 +13,7 @@
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H __FILE__
#include <linux/sysdev.h>
#include <linux/device.h>
#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
@ -202,7 +202,7 @@ struct s3c2410_dma_chan {
struct s3c2410_dma_buf *end; /* end of queue */
/* system device */
struct sys_device dev;
struct device dev;
};
typedef unsigned long dma_device_t;

View file

@ -18,7 +18,7 @@
#include <linux/memblock.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/io.h>

View file

@ -28,7 +28,7 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/spi/spi.h>

View file

@ -25,7 +25,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/list.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -66,30 +66,34 @@ static struct cpufreq_frequency_table pll_vals_12MHz[] = {
{ .frequency = 270000000, .index = PLLVAL(127, 1, 1), },
};
static int s3c2410_plls_add(struct sys_device *dev)
static int s3c2410_plls_add(struct device *dev)
{
return s3c_plltab_register(pll_vals_12MHz, ARRAY_SIZE(pll_vals_12MHz));
}
static struct sysdev_driver s3c2410_plls_drv = {
.add = s3c2410_plls_add,
static struct subsys_interface s3c2410_plls_interface = {
.name = "s3c2410_plls",
.subsys = &s3c2410_subsys,
.add_dev = s3c2410_plls_add,
};
static int __init s3c2410_pll_init(void)
{
return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_plls_drv);
return subsys_interface_register(&s3c2410_plls_interface);
}
arch_initcall(s3c2410_pll_init);
static struct sysdev_driver s3c2410a_plls_drv = {
.add = s3c2410_plls_add,
static struct subsys_interface s3c2410a_plls_interface = {
.name = "s3c2410a_plls",
.subsys = &s3c2410a_subsys,
.add_dev = s3c2410_plls_add,
};
static int __init s3c2410a_pll_init(void)
{
return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_plls_drv);
return subsys_interface_register(&s3c2410a_plls_interface);
}
arch_initcall(s3c2410a_pll_init);

View file

@ -24,7 +24,7 @@
#include <linux/suspend.h>
#include <linux/errno.h>
#include <linux/time.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/gpio.h>
#include <linux/io.h>
@ -111,7 +111,7 @@ struct syscore_ops s3c2410_pm_syscore_ops = {
.resume = s3c2410_pm_resume,
};
static int s3c2410_pm_add(struct sys_device *dev)
static int s3c2410_pm_add(struct device *dev)
{
pm_cpu_prep = s3c2410_pm_prepare;
pm_cpu_sleep = s3c2410_cpu_suspend;
@ -120,52 +120,60 @@ static int s3c2410_pm_add(struct sys_device *dev)
}
#if defined(CONFIG_CPU_S3C2410)
static struct sysdev_driver s3c2410_pm_driver = {
.add = s3c2410_pm_add,
static struct subsys_interface s3c2410_pm_interface = {
.name = "s3c2410_pm",
.subsys = &s3c2410_subsys,
.add_dev = s3c2410_pm_add,
};
/* register ourselves */
static int __init s3c2410_pm_drvinit(void)
{
return sysdev_driver_register(&s3c2410_sysclass, &s3c2410_pm_driver);
return subsys_interface_register(&s3c2410_pm_interface);
}
arch_initcall(s3c2410_pm_drvinit);
static struct sysdev_driver s3c2410a_pm_driver = {
.add = s3c2410_pm_add,
static struct subsys_interface s3c2410a_pm_interface = {
.name = "s3c2410a_pm",
.subsys = &s3c2410a_subsys,
.add_dev = s3c2410_pm_add,
};
static int __init s3c2410a_pm_drvinit(void)
{
return sysdev_driver_register(&s3c2410a_sysclass, &s3c2410a_pm_driver);
return subsys_interface_register(&s3c2410a_pm_interface);
}
arch_initcall(s3c2410a_pm_drvinit);
#endif
#if defined(CONFIG_CPU_S3C2440)
static struct sysdev_driver s3c2440_pm_driver = {
.add = s3c2410_pm_add,
static struct subsys_interface s3c2440_pm_interface = {
.name = "s3c2440_pm",
.subsys = &s3c2440_subsys,
.add_dev = s3c2410_pm_add,
};
static int __init s3c2440_pm_drvinit(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_pm_driver);
return subsys_interface_register(&s3c2440_pm_interface);
}
arch_initcall(s3c2440_pm_drvinit);
#endif
#if defined(CONFIG_CPU_S3C2442)
static struct sysdev_driver s3c2442_pm_driver = {
.add = s3c2410_pm_add,
static struct subsys_interface s3c2442_pm_interface = {
.name = "s3c2442_pm",
.subsys = &s3c2442_subsys,
.add_dev = s3c2410_pm_add,
};
static int __init s3c2442_pm_drvinit(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_pm_driver);
return subsys_interface_register(&s3c2442_pm_interface);
}
arch_initcall(s3c2442_pm_drvinit);

View file

@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
@ -131,22 +131,24 @@ void __init s3c2410_init_clocks(int xtal)
s3c24xx_register_clock(&s3c2410_armclk);
}
struct sysdev_class s3c2410_sysclass = {
struct bus_type s3c2410_subsys = {
.name = "s3c2410-core",
.dev_name = "s3c2410-core",
};
/* Note, we would have liked to name this s3c2410-core, but we cannot
* register two sysdev_class with the same name.
* register two subsystems with the same name.
*/
struct sysdev_class s3c2410a_sysclass = {
struct bus_type s3c2410a_subsys = {
.name = "s3c2410a-core",
.dev_name = "s3c2410a-core",
};
static struct sys_device s3c2410_sysdev = {
.cls = &s3c2410_sysclass,
static struct device s3c2410_dev = {
.bus = &s3c2410_subsys,
};
/* need to register class before we actually register the device, and
/* need to register the subsystem before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2410 based system)
* as a driver which may support both 2410 and 2440 may try and use it.
@ -154,14 +156,14 @@ static struct sys_device s3c2410_sysdev = {
static int __init s3c2410_core_init(void)
{
return sysdev_class_register(&s3c2410_sysclass);
return subsys_system_register(&s3c2410_subsys, NULL);
}
core_initcall(s3c2410_core_init);
static int __init s3c2410a_core_init(void)
{
return sysdev_class_register(&s3c2410a_sysclass);
return subsys_system_register(&s3c2410a_subsys, NULL);
}
core_initcall(s3c2410a_core_init);
@ -175,11 +177,11 @@ int __init s3c2410_init(void)
#endif
register_syscore_ops(&s3c24xx_irq_syscore_ops);
return sysdev_register(&s3c2410_sysdev);
return device_register(&s3c2410_dev);
}
int __init s3c2410a_init(void)
{
s3c2410_sysdev.cls = &s3c2410a_sysclass;
s3c2410_dev.bus = &s3c2410a_subsys;
return s3c2410_init();
}

View file

@ -26,7 +26,7 @@
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/mutex.h>
#include <linux/delay.h>

View file

@ -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/delay.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -194,7 +194,7 @@ static struct s3c_cpufreq_info s3c2412_cpufreq_info = {
.debug_io_show = s3c_cpufreq_debugfs_call(s3c2412_iotiming_debugfs),
};
static int s3c2412_cpufreq_add(struct sys_device *sysdev)
static int s3c2412_cpufreq_add(struct device *dev)
{
unsigned long fclk_rate;
@ -244,14 +244,15 @@ static int s3c2412_cpufreq_add(struct sys_device *sysdev)
return -ENOENT;
}
static struct sysdev_driver s3c2412_cpufreq_driver = {
.add = s3c2412_cpufreq_add,
static struct subsys_interface s3c2412_cpufreq_interface = {
.name = "s3c2412_cpufreq",
.subsys = &s3c2412_subsys,
.add_dev = s3c2412_cpufreq_add,
};
static int s3c2412_cpufreq_init(void)
{
return sysdev_driver_register(&s3c2412_sysclass,
&s3c2412_cpufreq_driver);
return subsys_interface_register(&s3c2412_cpufreq_interface);
}
arch_initcall(s3c2412_cpufreq_init);

View file

@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/io.h>
@ -159,19 +159,21 @@ static struct s3c24xx_dma_selection __initdata s3c2412_dma_sel = {
.map_size = ARRAY_SIZE(s3c2412_dma_mappings),
};
static int __init s3c2412_dma_add(struct sys_device *sysdev)
static int __init s3c2412_dma_add(struct device *dev)
{
s3c2410_dma_init();
return s3c24xx_dma_init_map(&s3c2412_dma_sel);
}
static struct sysdev_driver s3c2412_dma_driver = {
.add = s3c2412_dma_add,
static struct subsys_interface s3c2412_dma_interface = {
.name = "s3c2412_dma",
.subsys = &s3c2412_subsys,
.add_dev = s3c2412_dma_add,
};
static int __init s3c2412_dma_init(void)
{
return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_dma_driver);
return subsys_interface_register(&s3c2412_dma_interface);
}
arch_initcall(s3c2412_dma_init);

View file

@ -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>
@ -170,7 +170,7 @@ static int s3c2412_irq_rtc_wake(struct irq_data *data, unsigned int state)
static struct irq_chip s3c2412_irq_rtc_chip;
static int s3c2412_irq_add(struct sys_device *sysdev)
static int s3c2412_irq_add(struct device *dev)
{
unsigned int irqno;
@ -200,13 +200,15 @@ static int s3c2412_irq_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2412_irq_driver = {
.add = s3c2412_irq_add,
static struct subsys_interface s3c2412_irq_interface = {
.name = "s3c2412_irq",
.subsys = &s3c2412_subsys,
.add_dev = s3c2412_irq_add,
};
static int s3c2412_irq_init(void)
{
return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_irq_driver);
return subsys_interface_register(&s3c2412_irq_interface);
}
arch_initcall(s3c2412_irq_init);

View file

@ -16,7 +16,7 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/platform_device.h>
#include <linux/io.h>
@ -56,7 +56,7 @@ static void s3c2412_pm_prepare(void)
{
}
static int s3c2412_pm_add(struct sys_device *sysdev)
static int s3c2412_pm_add(struct device *dev)
{
pm_cpu_prep = s3c2412_pm_prepare;
pm_cpu_sleep = s3c2412_cpu_suspend;
@ -87,13 +87,15 @@ static struct sleep_save s3c2412_sleep[] = {
SAVE_ITEM(S3C2413_GPJSLPCON),
};
static struct sysdev_driver s3c2412_pm_driver = {
.add = s3c2412_pm_add,
static struct subsys_interface s3c2412_pm_interface = {
.name = "s3c2412_pm",
.subsys = &s3c2412_subsys,
.add_dev = s3c2412_pm_add,
};
static __init int s3c2412_pm_init(void)
{
return sysdev_driver_register(&s3c2412_sysclass, &s3c2412_pm_driver);
return subsys_interface_register(&s3c2412_pm_interface);
}
arch_initcall(s3c2412_pm_init);

View file

@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
@ -220,25 +220,26 @@ void __init s3c2412_init_clocks(int xtal)
s3c2412_baseclk_add();
}
/* need to register class before we actually register the device, and
/* need to register the subsystem before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2412 based system)
* as a driver which may support both 2410 and 2440 may try and use it.
*/
struct sysdev_class s3c2412_sysclass = {
struct bus_type s3c2412_subsys = {
.name = "s3c2412-core",
.dev_name = "s3c2412-core",
};
static int __init s3c2412_core_init(void)
{
return sysdev_class_register(&s3c2412_sysclass);
return subsys_system_register(&s3c2412_subsys, NULL);
}
core_initcall(s3c2412_core_init);
static struct sys_device s3c2412_sysdev = {
.cls = &s3c2412_sysclass,
static struct device s3c2412_dev = {
.bus = &s3c2412_subsys,
};
int __init s3c2412_init(void)
@ -250,5 +251,5 @@ int __init s3c2412_init(void)
#endif
register_syscore_ops(&s3c24xx_irq_syscore_ops);
return sysdev_register(&s3c2412_sysdev);
return device_register(&s3c2412_dev);
}

View file

@ -25,7 +25,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>
@ -213,7 +213,7 @@ static int __init s3c2416_add_sub(unsigned int base,
return 0;
}
static int __init s3c2416_irq_add(struct sys_device *sysdev)
static int __init s3c2416_irq_add(struct device *dev)
{
printk(KERN_INFO "S3C2416: IRQ Support\n");
@ -234,13 +234,15 @@ static int __init s3c2416_irq_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2416_irq_driver = {
.add = s3c2416_irq_add,
static struct subsys_interface s3c2416_irq_interface = {
.name = "s3c2416_irq",
.subsys = &s3c2416_subsys,
.add_dev = s3c2416_irq_add,
};
static int __init s3c2416_irq_init(void)
{
return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_irq_driver);
return subsys_interface_register(&s3c2416_irq_interface);
}
arch_initcall(s3c2416_irq_init);

View file

@ -10,7 +10,7 @@
* published by the Free Software Foundation.
*/
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/io.h>
@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void)
__raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1);
}
static int s3c2416_pm_add(struct sys_device *sysdev)
static int s3c2416_pm_add(struct device *dev)
{
pm_cpu_prep = s3c2416_pm_prepare;
pm_cpu_sleep = s3c2416_cpu_suspend;
@ -56,13 +56,15 @@ static int s3c2416_pm_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2416_pm_driver = {
.add = s3c2416_pm_add,
static struct subsys_interface s3c2416_pm_interface = {
.name = "s3c2416_pm",
.subsys = &s3c2416_subsys,
.add_dev = s3c2416_pm_add,
};
static __init int s3c2416_pm_init(void)
{
return sysdev_driver_register(&s3c2416_sysclass, &s3c2416_pm_driver);
return subsys_interface_register(&s3c2416_pm_interface);
}
arch_initcall(s3c2416_pm_init);

View file

@ -31,7 +31,7 @@
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/clk.h>
#include <linux/io.h>
@ -68,12 +68,13 @@ static struct map_desc s3c2416_iodesc[] __initdata = {
IODESC_ENT(TIMER),
};
struct sysdev_class s3c2416_sysclass = {
struct bus_type s3c2416_subsys = {
.name = "s3c2416-core",
.dev_name = "s3c2416-core",
};
static struct sys_device s3c2416_sysdev = {
.cls = &s3c2416_sysclass,
static struct device s3c2416_dev = {
.bus = &s3c2416_subsys,
};
static void s3c2416_hard_reset(void)
@ -105,7 +106,7 @@ int __init s3c2416_init(void)
#endif
register_syscore_ops(&s3c24xx_irq_syscore_ops);
return sysdev_register(&s3c2416_sysdev);
return device_register(&s3c2416_dev);
}
void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
@ -133,7 +134,7 @@ void __init s3c2416_map_io(void)
iotable_init(s3c2416_iodesc, ARRAY_SIZE(s3c2416_iodesc));
}
/* need to register class before we actually register the device, and
/* need to register the subsystem before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2416 based system)
* as a driver which may support both 2443 and 2440 may try and use it.
@ -141,7 +142,7 @@ void __init s3c2416_map_io(void)
static int __init s3c2416_core_init(void)
{
return sysdev_class_register(&s3c2416_sysclass);
return subsys_system_register(&s3c2416_subsys, NULL);
}
core_initcall(s3c2416_core_init);

View file

@ -28,7 +28,6 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/mutex.h>
@ -108,7 +107,7 @@ static struct clk s3c2440_clk_ac97 = {
.ctrlbit = S3C2440_CLKCON_CAMERA,
};
static int s3c2440_clk_add(struct sys_device *sysdev)
static int s3c2440_clk_add(struct device *dev)
{
struct clk *clock_upll;
struct clk *clock_h;
@ -137,13 +136,15 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2440_clk_driver = {
.add = s3c2440_clk_add,
static struct subsys_interface s3c2440_clk_interface = {
.name = "s3c2440_clk",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_clk_add,
};
static __init int s3c24xx_clk_driver(void)
static __init int s3c24xx_clk_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
return subsys_interface_register(&s3c2440_clk_interface);
}
arch_initcall(s3c24xx_clk_driver);
arch_initcall(s3c24xx_clk_init);

View file

@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <mach/map.h>
@ -174,20 +174,22 @@ static struct s3c24xx_dma_order __initdata s3c2440_dma_order = {
},
};
static int __init s3c2440_dma_add(struct sys_device *sysdev)
static int __init s3c2440_dma_add(struct device *dev)
{
s3c2410_dma_init();
s3c24xx_dma_order_set(&s3c2440_dma_order);
return s3c24xx_dma_init_map(&s3c2440_dma_sel);
}
static struct sysdev_driver s3c2440_dma_driver = {
.add = s3c2440_dma_add,
static struct subsys_interface s3c2440_dma_interface = {
.name = "s3c2440_dma",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_dma_add,
};
static int __init s3c2440_dma_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_dma_driver);
return subsys_interface_register(&s3c2440_dma_interface);
}
arch_initcall(s3c2440_dma_init);

View file

@ -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>
@ -92,7 +92,7 @@ static struct irq_chip s3c_irq_wdtac97 = {
.irq_ack = s3c_irq_wdtac97_ack,
};
static int s3c2440_irq_add(struct sys_device *sysdev)
static int s3c2440_irq_add(struct device *dev)
{
unsigned int irqno;
@ -113,13 +113,15 @@ static int s3c2440_irq_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2440_irq_driver = {
.add = s3c2440_irq_add,
static struct subsys_interface s3c2440_irq_interface = {
.name = "s3c2440_irq",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_irq_add,
};
static int s3c2440_irq_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
return subsys_interface_register(&s3c2440_irq_interface);
}
arch_initcall(s3c2440_irq_init);

View file

@ -24,7 +24,7 @@
#include <linux/serial_core.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/pda_power.h>
#include <linux/pwm_backlight.h>
#include <linux/pwm.h>

View file

@ -20,7 +20,7 @@
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/serial.h>

View file

@ -17,7 +17,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -270,7 +270,7 @@ struct s3c_cpufreq_info s3c2440_cpufreq_info = {
.debug_io_show = s3c_cpufreq_debugfs_call(s3c2410_iotiming_debugfs),
};
static int s3c2440_cpufreq_add(struct sys_device *sysdev)
static int s3c2440_cpufreq_add(struct device *dev)
{
xtal = s3c_cpufreq_clk_get(NULL, "xtal");
hclk = s3c_cpufreq_clk_get(NULL, "hclk");
@ -285,27 +285,29 @@ static int s3c2440_cpufreq_add(struct sys_device *sysdev)
return s3c_cpufreq_register(&s3c2440_cpufreq_info);
}
static struct sysdev_driver s3c2440_cpufreq_driver = {
.add = s3c2440_cpufreq_add,
static struct subsys_interface s3c2440_cpufreq_interface = {
.name = "s3c2440_cpufreq",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_cpufreq_add,
};
static int s3c2440_cpufreq_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass,
&s3c2440_cpufreq_driver);
return subsys_interface_register(&s3c2440_cpufreq_interface);
}
/* arch_initcall adds the clocks we need, so use subsys_initcall. */
subsys_initcall(s3c2440_cpufreq_init);
static struct sysdev_driver s3c2442_cpufreq_driver = {
.add = s3c2440_cpufreq_add,
static struct subsys_interface s3c2442_cpufreq_interface = {
.name = "s3c2442_cpufreq",
.subsys = &s3c2442_subsys,
.add_dev = s3c2440_cpufreq_add,
};
static int s3c2442_cpufreq_init(void)
{
return sysdev_driver_register(&s3c2442_sysclass,
&s3c2442_cpufreq_driver);
return subsys_interface_register(&s3c2442_cpufreq_interface);
}
subsys_initcall(s3c2442_cpufreq_init);

View file

@ -14,7 +14,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -51,7 +51,7 @@ static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = {
{ .frequency = 400000000, .index = PLLVAL(0x5c, 1, 1), }, /* FVco 800.000000 */
};
static int s3c2440_plls12_add(struct sys_device *dev)
static int s3c2440_plls12_add(struct device *dev)
{
struct clk *xtal_clk;
unsigned long xtal;
@ -72,25 +72,29 @@ static int s3c2440_plls12_add(struct sys_device *dev)
return 0;
}
static struct sysdev_driver s3c2440_plls12_drv = {
.add = s3c2440_plls12_add,
static struct subsys_interface s3c2440_plls12_interface = {
.name = "s3c2440_plls12",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_plls12_add,
};
static int __init s3c2440_pll_12mhz(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_plls12_drv);
return subsys_interface_register(&s3c2440_plls12_interface);
}
arch_initcall(s3c2440_pll_12mhz);
static struct sysdev_driver s3c2442_plls12_drv = {
.add = s3c2440_plls12_add,
static struct subsys_interface s3c2442_plls12_interface = {
.name = "s3c2442_plls12",
.subsys = &s3c2442_subsys,
.add_dev = s3c2440_plls12_add,
};
static int __init s3c2442_pll_12mhz(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_plls12_drv);
return subsys_interface_register(&s3c2442_plls12_interface);
}

View file

@ -14,7 +14,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/err.h>
@ -79,7 +79,7 @@ static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = {
{ .frequency = 402192000, .index = PLLVAL(87, 2, 1), }, /* FVco 804.384000 */
};
static int s3c2440_plls169344_add(struct sys_device *dev)
static int s3c2440_plls169344_add(struct device *dev)
{
struct clk *xtal_clk;
unsigned long xtal;
@ -100,28 +100,28 @@ static int s3c2440_plls169344_add(struct sys_device *dev)
return 0;
}
static struct sysdev_driver s3c2440_plls169344_drv = {
.add = s3c2440_plls169344_add,
static struct subsys_interface s3c2440_plls169344_interface = {
.name = "s3c2440_plls169344",
.subsys = &s3c2440_subsys,
.add_dev = s3c2440_plls169344_add,
};
static int __init s3c2440_pll_16934400(void)
{
return sysdev_driver_register(&s3c2440_sysclass,
&s3c2440_plls169344_drv);
return subsys_interface_register(&s3c2440_plls169344_interface);
}
arch_initcall(s3c2440_pll_16934400);
static struct sysdev_driver s3c2442_plls169344_drv = {
.add = s3c2440_plls169344_add,
static struct subsys_interface s3c2442_plls169344_interface = {
.name = "s3c2442_plls169344",
.subsys = &s3c2442_subsys,
.add_dev = s3c2440_plls169344_add,
};
static int __init s3c2442_pll_16934400(void)
{
return sysdev_driver_register(&s3c2442_sysclass,
&s3c2442_plls169344_drv);
return subsys_interface_register(&s3c2442_plls169344_interface);
}
arch_initcall(s3c2442_pll_16934400);

View file

@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/gpio.h>
#include <linux/clk.h>
@ -40,8 +40,8 @@
#include <plat/gpio-cfg.h>
#include <plat/gpio-cfg-helpers.h>
static struct sys_device s3c2440_sysdev = {
.cls = &s3c2440_sysclass,
static struct device s3c2440_dev = {
.bus = &s3c2440_subsys,
};
int __init s3c2440_init(void)
@ -63,7 +63,7 @@ int __init s3c2440_init(void)
/* register our system device for everything else */
return sysdev_register(&s3c2440_sysdev);
return device_register(&s3c2440_dev);
}
void __init s3c2440_map_io(void)

View file

@ -28,7 +28,6 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/syscore_ops.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
@ -123,7 +122,7 @@ static struct clk s3c2442_clk_cam_upll = {
},
};
static int s3c2442_clk_add(struct sys_device *sysdev)
static int s3c2442_clk_add(struct device *dev)
{
struct clk *clock_upll;
struct clk *clock_h;
@ -149,20 +148,22 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2442_clk_driver = {
.add = s3c2442_clk_add,
static struct subsys_interface s3c2442_clk_interface = {
.name = "s3c2442_clk",
.subsys = &s3c2442_subsys,
.add_dev = s3c2442_clk_add,
};
static __init int s3c2442_clk_init(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver);
return subsys_interface_register(&s3c2442_clk_interface);
}
arch_initcall(s3c2442_clk_init);
static struct sys_device s3c2442_sysdev = {
.cls = &s3c2442_sysclass,
static struct device s3c2442_dev = {
.bus = &s3c2442_subsys,
};
int __init s3c2442_init(void)
@ -175,7 +176,7 @@ int __init s3c2442_init(void)
register_syscore_ops(&s3c244x_pm_syscore_ops);
register_syscore_ops(&s3c24xx_irq_syscore_ops);
return sysdev_register(&s3c2442_sysdev);
return device_register(&s3c2442_dev);
}
void __init s3c2442_map_io(void)

View file

@ -28,7 +28,6 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/clk.h>
@ -73,7 +72,7 @@ static struct clk clk_arm = {
},
};
static int s3c244x_clk_add(struct sys_device *sysdev)
static int s3c244x_clk_add(struct device *dev)
{
unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
unsigned long clkdivn;
@ -115,24 +114,28 @@ static int s3c244x_clk_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2440_clk_driver = {
.add = s3c244x_clk_add,
static struct subsys_interface s3c2440_clk_interface = {
.name = "s3c2440_clk",
.subsys = &s3c2440_subsys,
.add_dev = s3c244x_clk_add,
};
static int s3c2440_clk_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
return subsys_interface_register(&s3c2440_clk_interface);
}
arch_initcall(s3c2440_clk_init);
static struct sysdev_driver s3c2442_clk_driver = {
.add = s3c244x_clk_add,
static struct subsys_interface s3c2442_clk_interface = {
.name = "s3c2442_clk",
.subsys = &s3c2442_subsys,
.add_dev = s3c244x_clk_add,
};
static int s3c2442_clk_init(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_clk_driver);
return subsys_interface_register(&s3c2442_clk_interface);
}
arch_initcall(s3c2442_clk_init);

View file

@ -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>
@ -91,7 +91,7 @@ static struct irq_chip s3c_irq_cam = {
.irq_ack = s3c_irq_cam_ack,
};
static int s3c244x_irq_add(struct sys_device *sysdev)
static int s3c244x_irq_add(struct device *dev)
{
unsigned int irqno;
@ -114,25 +114,29 @@ static int s3c244x_irq_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2440_irq_driver = {
.add = s3c244x_irq_add,
static struct subsys_interface s3c2440_irq_interface = {
.name = "s3c2440_irq",
.subsys = &s3c2440_subsys,
.add_dev = s3c244x_irq_add,
};
static int s3c2440_irq_init(void)
{
return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
return subsys_interface_register(&s3c2440_irq_interface);
}
arch_initcall(s3c2440_irq_init);
static struct sysdev_driver s3c2442_irq_driver = {
.add = s3c244x_irq_add,
static struct subsys_interface s3c2442_irq_interface = {
.name = "s3c2442_irq",
.subsys = &s3c2442_subsys,
.add_dev = s3c244x_irq_add,
};
static int s3c2442_irq_init(void)
{
return sysdev_driver_register(&s3c2442_sysclass, &s3c2442_irq_driver);
return subsys_interface_register(&s3c2442_irq_interface);
}
arch_initcall(s3c2442_irq_init);

View file

@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/clk.h>
#include <linux/io.h>
@ -135,17 +135,19 @@ void __init s3c244x_init_clocks(int xtal)
s3c2410_baseclk_add();
}
/* Since the S3C2442 and S3C2440 share items, put both sysclasses here */
/* Since the S3C2442 and S3C2440 share items, put both subsystems here */
struct sysdev_class s3c2440_sysclass = {
struct bus_type s3c2440_subsys = {
.name = "s3c2440-core",
.dev_name = "s3c2440-core",
};
struct sysdev_class s3c2442_sysclass = {
struct bus_type s3c2442_subsys = {
.name = "s3c2442-core",
.dev_name = "s3c2442-core",
};
/* need to register class before we actually register the device, and
/* need to register the subsystem before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2440 based system)
* as a driver which may support both 2410 and 2440 may try and use it.
@ -153,14 +155,14 @@ struct sysdev_class s3c2442_sysclass = {
static int __init s3c2440_core_init(void)
{
return sysdev_class_register(&s3c2440_sysclass);
return subsys_system_register(&s3c2440_subsys, NULL);
}
core_initcall(s3c2440_core_init);
static int __init s3c2442_core_init(void)
{
return sysdev_class_register(&s3c2442_sysclass);
return subsys_system_register(&s3c2442_subsys, NULL);
}
core_initcall(s3c2442_core_init);

View file

@ -27,7 +27,7 @@
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/mutex.h>
#include <linux/serial_core.h>

View file

@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/io.h>
@ -135,19 +135,21 @@ static struct s3c24xx_dma_selection __initdata s3c2443_dma_sel = {
.map_size = ARRAY_SIZE(s3c2443_dma_mappings),
};
static int __init s3c2443_dma_add(struct sys_device *sysdev)
static int __init s3c2443_dma_add(struct device *dev)
{
s3c24xx_dma_init(6, IRQ_S3C2443_DMA0, 0x100);
return s3c24xx_dma_init_map(&s3c2443_dma_sel);
}
static struct sysdev_driver s3c2443_dma_driver = {
.add = s3c2443_dma_add,
static struct subsys_interface s3c2443_dma_interface = {
.name = "s3c2443_dma",
.subsys = &s3c2443_subsys,
.add_dev = s3c2443_dma_add,
};
static int __init s3c2443_dma_init(void)
{
return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_dma_driver);
return subsys_interface_register(&s3c2443_dma_interface);
}
arch_initcall(s3c2443_dma_init);

View file

@ -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>
@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base,
return 0;
}
static int __init s3c2443_irq_add(struct sys_device *sysdev)
static int __init s3c2443_irq_add(struct device *dev)
{
printk("S3C2443: IRQ Support\n");
@ -265,13 +265,15 @@ static int __init s3c2443_irq_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s3c2443_irq_driver = {
.add = s3c2443_irq_add,
static struct subsys_interface s3c2443_irq_interface = {
.name = "s3c2443_irq",
.subsys = &s3c2443_subsys,
.add_dev = s3c2443_irq_add,
};
static int __init s3c2443_irq_init(void)
{
return sysdev_driver_register(&s3c2443_sysclass, &s3c2443_irq_driver);
return subsys_interface_register(&s3c2443_irq_interface);
}
arch_initcall(s3c2443_irq_init);

View file

@ -19,7 +19,7 @@
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/serial_core.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/io.h>
@ -49,12 +49,13 @@ static struct map_desc s3c2443_iodesc[] __initdata = {
IODESC_ENT(TIMER),
};
struct sysdev_class s3c2443_sysclass = {
struct bus_type s3c2443_subsys = {
.name = "s3c2443-core",
.dev_name = "s3c2443-core",
};
static struct sys_device s3c2443_sysdev = {
.cls = &s3c2443_sysclass,
static struct device s3c2443_dev = {
.bus = &s3c2443_subsys,
};
static void s3c2443_hard_reset(void)
@ -77,7 +78,7 @@ int __init s3c2443_init(void)
s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT;
return sysdev_register(&s3c2443_sysdev);
return device_register(&s3c2443_dev);
}
void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no)
@ -99,7 +100,7 @@ void __init s3c2443_map_io(void)
iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc));
}
/* need to register class before we actually register the device, and
/* need to register the subsystem before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2443 based system)
* as a driver which may support both 2443 and 2440 may try and use it.
@ -107,7 +108,7 @@ void __init s3c2443_map_io(void)
static int __init s3c2443_core_init(void)
{
return sysdev_class_register(&s3c2443_sysclass);
return subsys_system_register(&s3c2443_subsys, NULL);
}
core_initcall(s3c2443_core_init);

View file

@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/io.h>
@ -122,12 +122,13 @@ static struct map_desc s3c_iodesc[] __initdata = {
};
struct sysdev_class s3c64xx_sysclass = {
.name = "s3c64xx-core",
struct bus_type s3c64xx_subsys = {
.name = "s3c64xx-core",
.dev_name = "s3c64xx-core",
};
static struct sys_device s3c64xx_sysdev = {
.cls = &s3c64xx_sysclass,
static struct device s3c64xx_dev = {
.bus = &s3c64xx_subsys,
};
/* uart registration process */
@ -152,10 +153,10 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
}
static __init int s3c64xx_sysdev_init(void)
static __init int s3c64xx_dev_init(void)
{
sysdev_class_register(&s3c64xx_sysclass);
return sysdev_register(&s3c64xx_sysdev);
subsys_system_register(&s3c64xx_subsys, NULL);
return device_register(&s3c64xx_dev);
}
core_initcall(s3c64xx_sysdev_init);
core_initcall(s3c64xx_dev_init);

View file

@ -16,7 +16,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/dmapool.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/delay.h>
@ -35,7 +35,7 @@
/* dma channel state information */
struct s3c64xx_dmac {
struct sys_device sysdev;
struct device dev;
struct clk *clk;
void __iomem *regs;
struct s3c2410_dma_chan *channels;
@ -631,8 +631,9 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw)
return IRQ_HANDLED;
}
static struct sysdev_class dma_sysclass = {
static struct bus_type dma_subsys = {
.name = "s3c64xx-dma",
.dev_name = "s3c64xx-dma",
};
static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
@ -651,12 +652,12 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
return -ENOMEM;
}
dmac->sysdev.id = chno / 8;
dmac->sysdev.cls = &dma_sysclass;
dmac->dev.id = chno / 8;
dmac->dev.bus = &dma_subsys;
err = sysdev_register(&dmac->sysdev);
err = device_register(&dmac->dev);
if (err) {
printk(KERN_ERR "%s: failed to register sysdevice\n", __func__);
printk(KERN_ERR "%s: failed to register device\n", __func__);
goto err_alloc;
}
@ -667,7 +668,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
goto err_dev;
}
snprintf(clkname, sizeof(clkname), "dma%d", dmac->sysdev.id);
snprintf(clkname, sizeof(clkname), "dma%d", dmac->dev.id);
dmac->clk = clk_get(NULL, clkname);
if (IS_ERR(dmac->clk)) {
@ -715,7 +716,7 @@ static int s3c64xx_dma_init1(int chno, enum dma_ch chbase,
err_map:
iounmap(regs);
err_dev:
sysdev_unregister(&dmac->sysdev);
device_unregister(&dmac->dev);
err_alloc:
kfree(dmac);
return err;
@ -733,9 +734,9 @@ static int __init s3c64xx_dma_init(void)
return -ENOMEM;
}
ret = sysdev_class_register(&dma_sysclass);
ret = subsys_system_register(&dma_subsys, NULL);
if (ret) {
printk(KERN_ERR "%s: failed to create sysclass\n", __func__);
printk(KERN_ERR "%s: failed to create subsys\n", __func__);
return -ENOMEM;
}

View file

@ -14,7 +14,7 @@
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/io.h>

View file

@ -17,7 +17,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
@ -70,17 +70,18 @@ void __init s3c6400_init_irq(void)
s3c64xx_init_irq(~0 & ~(0xf << 5), ~0);
}
static struct sysdev_class s3c6400_sysclass = {
.name = "s3c6400-core",
static struct bus_type s3c6400_subsys = {
.name = "s3c6400-core",
.dev_name = "s3c6400-core",
};
static struct sys_device s3c6400_sysdev = {
.cls = &s3c6400_sysclass,
static struct device s3c6400_dev = {
.bus = &s3c6400_subsys,
};
static int __init s3c6400_core_init(void)
{
return sysdev_class_register(&s3c6400_sysclass);
return subsys_system_register(&s3c6400_subsys, NULL);
}
core_initcall(s3c6400_core_init);
@ -89,5 +90,5 @@ int __init s3c6400_init(void)
{
printk("S3C6400: Initialising architecture\n");
return sysdev_register(&s3c6400_sysdev);
return device_register(&s3c6400_dev);
}

View file

@ -18,7 +18,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
@ -75,17 +75,18 @@ void __init s3c6410_init_irq(void)
s3c64xx_init_irq(~0 & ~(1 << 7), ~0);
}
struct sysdev_class s3c6410_sysclass = {
.name = "s3c6410-core",
struct bus_type s3c6410_subsys = {
.name = "s3c6410-core",
.dev_name = "s3c6410-core",
};
static struct sys_device s3c6410_sysdev = {
.cls = &s3c6410_sysclass,
static struct device s3c6410_dev = {
.bus = &s3c6410_subsys,
};
static int __init s3c6410_core_init(void)
{
return sysdev_class_register(&s3c6410_sysclass);
return subsys_system_register(&s3c6410_subsys, NULL);
}
core_initcall(s3c6410_core_init);
@ -94,5 +95,5 @@ int __init s3c6410_init(void)
{
printk("S3C6410: Initialising architecture\n");
return sysdev_register(&s3c6410_sysdev);
return device_register(&s3c6410_dev);
}

View file

@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <mach/hardware.h>

View file

@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <mach/hardware.h>

View file

@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <mach/hardware.h>

View file

@ -16,7 +16,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
@ -190,17 +190,18 @@ void __init s5p6450_init_irq(void)
s5p_init_irq(vic, ARRAY_SIZE(vic));
}
struct sysdev_class s5p64x0_sysclass = {
.name = "s5p64x0-core",
struct bus_type s5p64x0_subsys = {
.name = "s5p64x0-core",
.dev_name = "s5p64x0-core",
};
static struct sys_device s5p64x0_sysdev = {
.cls = &s5p64x0_sysclass,
static struct device s5p64x0_dev = {
.bus = &s5p64x0_subsys,
};
static int __init s5p64x0_core_init(void)
{
return sysdev_class_register(&s5p64x0_sysclass);
return subsys_system_register(&s5p64x0_subsys, NULL);
}
core_initcall(s5p64x0_core_init);
@ -211,5 +212,5 @@ int __init s5p64x0_init(void)
/* set idle function */
pm_idle = s5p64x0_idle;
return sysdev_register(&s5p64x0_sysdev);
return device_register(&s5p64x0_dev);
}

View file

@ -160,7 +160,7 @@ static void s5p64x0_pm_prepare(void)
}
static int s5p64x0_pm_add(struct sys_device *sysdev)
static int s5p64x0_pm_add(struct device *dev)
{
pm_cpu_prep = s5p64x0_pm_prepare;
pm_cpu_sleep = s5p64x0_cpu_suspend;
@ -169,15 +169,17 @@ static int s5p64x0_pm_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s5p64x0_pm_driver = {
.add = s5p64x0_pm_add,
static struct subsys_interface s5p64x0_pm_interface = {
.name = "s5p64x0_pm",
.subsys = &s5p64x0_subsys,
.add_dev = s5p64x0_pm_add,
};
static __init int s5p64x0_pm_drvinit(void)
{
s3c_pm_init();
return sysdev_driver_register(&s5p64x0_sysclass, &s5p64x0_pm_driver);
return subsys_interface_register(&s5p64x0_pm_interface);
}
arch_initcall(s5p64x0_pm_drvinit);

View file

@ -21,7 +21,7 @@
#include <linux/init.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
@ -143,17 +143,18 @@ void __init s5pc100_init_irq(void)
s5p_init_irq(vic, ARRAY_SIZE(vic));
}
static struct sysdev_class s5pc100_sysclass = {
.name = "s5pc100-core",
static struct bus_type s5pc100_subsys = {
.name = "s5pc100-core",
.dev_name = "s5pc100-core",
};
static struct sys_device s5pc100_sysdev = {
.cls = &s5pc100_sysclass,
static struct device s5pc100_dev = {
.bus = &s5pc100_subsys,
};
static int __init s5pc100_core_init(void)
{
return sysdev_class_register(&s5pc100_sysclass);
return subsys_system_register(&s5pc100_subsys, NULL);
}
core_initcall(s5pc100_core_init);
@ -165,5 +166,5 @@ int __init s5pc100_init(void)
/* set idle function */
pm_idle = s5pc100_idle;
return sysdev_register(&s5pc100_sysdev);
return device_register(&s5pc100_dev);
}

View file

@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <mach/map.h>

View file

@ -17,7 +17,7 @@
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/dma-mapping.h>
@ -174,17 +174,18 @@ void __init s5pv210_init_irq(void)
s5p_init_irq(vic, ARRAY_SIZE(vic));
}
struct sysdev_class s5pv210_sysclass = {
.name = "s5pv210-core",
struct bus_type s5pv210_subsys = {
.name = "s5pv210-core",
.dev_name = "s5pv210-core",
};
static struct sys_device s5pv210_sysdev = {
.cls = &s5pv210_sysclass,
static struct device s5pv210_dev = {
.bus = &s5pv210_subsys,
};
static int __init s5pv210_core_init(void)
{
return sysdev_class_register(&s5pv210_sysclass);
return subsys_system_register(&s5pv210_subsys, NULL);
}
core_initcall(s5pv210_core_init);
@ -199,5 +200,5 @@ int __init s5pv210_init(void)
/* set sw_reset function */
s5p_reset_hook = s5pv210_sw_reset;
return sysdev_register(&s5pv210_sysdev);
return device_register(&s5pv210_dev);
}

View file

@ -13,7 +13,7 @@
#include <linux/init.h>
#include <linux/serial_core.h>
#include <linux/i2c.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

View file

@ -13,7 +13,7 @@
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/serial_core.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/dm9000.h>
#include <linux/fb.h>
#include <linux/gpio.h>

View file

@ -133,7 +133,7 @@ static void s5pv210_pm_prepare(void)
s3c_pm_do_save(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save));
}
static int s5pv210_pm_add(struct sys_device *sysdev)
static int s5pv210_pm_add(struct device *dev)
{
pm_cpu_prep = s5pv210_pm_prepare;
pm_cpu_sleep = s5pv210_cpu_suspend;
@ -141,13 +141,15 @@ static int s5pv210_pm_add(struct sys_device *sysdev)
return 0;
}
static struct sysdev_driver s5pv210_pm_driver = {
.add = s5pv210_pm_add,
static struct subsys_interface s5pv210_pm_interface = {
.name = "s5pv210_pm",
.subsys = &s5pv210_subsys,
.add_dev = s5pv210_pm_add,
};
static __init int s5pv210_pm_drvinit(void)
{
return sysdev_driver_register(&s5pv210_sysclass, &s5pv210_pm_driver);
return subsys_interface_register(&s5pv210_pm_interface);
}
arch_initcall(s5pv210_pm_drvinit);

View file

@ -22,7 +22,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/irqdomain.h>
#include <linux/of_address.h>

View file

@ -21,7 +21,6 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <linux/io.h>

View file

@ -21,7 +21,6 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/amba/bus.h>
#include <linux/amba/pl061.h>
#include <linux/amba/mmci.h>

View file

@ -10,7 +10,7 @@
#include <linux/ata_platform.h>
#include <linux/smsc911x.h>
#include <linux/spinlock.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/usb/isp1760.h>
#include <linux/clkdev.h>
#include <linux/mtd/physmap.h>

View file

@ -19,7 +19,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/ptrace.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <asm/irq.h>

View file

@ -19,7 +19,7 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>

View file

@ -20,7 +20,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/slab.h>

View file

@ -22,7 +22,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <asm/irq.h>

View file

@ -18,7 +18,6 @@
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>

View file

@ -26,7 +26,7 @@
#include <linux/list.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/mutex.h>
#include <linux/delay.h>

View file

@ -17,7 +17,7 @@
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/seq_file.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/err.h>

View file

@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <asm/div64.h>

View file

@ -14,7 +14,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 <asm/hardware/vic.h>

View file

@ -16,7 +16,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/io.h>
#include <plat/clock.h>

View file

@ -33,7 +33,7 @@
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/clk.h>

View file

@ -185,20 +185,20 @@ extern struct syscore_ops s3c2416_pm_syscore_ops;
extern struct syscore_ops s3c244x_pm_syscore_ops;
extern struct syscore_ops s3c64xx_irq_syscore_ops;
/* system device classes */
/* system device subsystems */
extern struct sysdev_class s3c2410_sysclass;
extern struct sysdev_class s3c2410a_sysclass;
extern struct sysdev_class s3c2412_sysclass;
extern struct sysdev_class s3c2416_sysclass;
extern struct sysdev_class s3c2440_sysclass;
extern struct sysdev_class s3c2442_sysclass;
extern struct sysdev_class s3c2443_sysclass;
extern struct sysdev_class s3c6410_sysclass;
extern struct sysdev_class s3c64xx_sysclass;
extern struct sysdev_class s5p64x0_sysclass;
extern struct sysdev_class s5pv210_sysclass;
extern struct sysdev_class exynos4_sysclass;
extern struct bus_type s3c2410_subsys;
extern struct bus_type s3c2410a_subsys;
extern struct bus_type s3c2412_subsys;
extern struct bus_type s3c2416_subsys;
extern struct bus_type s3c2440_subsys;
extern struct bus_type s3c2442_subsys;
extern struct bus_type s3c2443_subsys;
extern struct bus_type s3c6410_subsys;
extern struct bus_type s3c64xx_subsys;
extern struct bus_type s5p64x0_subsys;
extern struct bus_type s5pv210_subsys;
extern struct bus_type exynos4_subsys;
extern void (*s5pc1xx_idle)(void);

View file

@ -12,7 +12,7 @@
#include <plat/dma-core.h>
extern struct sysdev_class dma_sysclass;
extern struct bus_type dma_subsys;
extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS];
#define DMA_CH_VALID (1<<31)

View file

@ -17,7 +17,7 @@
#include <linux/irq.h>
struct sys_device;
struct device;
#ifdef CONFIG_PM

View file

@ -14,7 +14,7 @@
*/
#include <linux/kernel.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/gpio.h>

View file

@ -11,7 +11,7 @@
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/types.h>
#include <linux/irq.h>
#include <linux/io.h>

View file

@ -13,7 +13,6 @@
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/sysdev.h>
#include <linux/timer.h>
#include <linux/err.h>
#include <linux/ctype.h>

View file

@ -6,7 +6,7 @@
* published by the Free Software Foundation.
*/
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
#include <linux/module.h>
@ -26,16 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
* XXX: If/when a SMP-capable implementation of AVR32 will ever be
* made, we must make sure that the code executes on the correct CPU.
*/
static ssize_t show_pc0event(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pc0event(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f);
}
static ssize_t store_pc0event(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
static ssize_t store_pc0event(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@ -48,16 +48,16 @@ static ssize_t store_pc0event(struct sys_device *dev,
sysreg_write(PCCR, val);
return count;
}
static ssize_t show_pc0count(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pc0count(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pcnt0;
pcnt0 = sysreg_read(PCNT0);
return sprintf(buf, "%lu\n", pcnt0);
}
static ssize_t store_pc0count(struct sys_device *dev,
struct sysdev_attribute *attr,
static ssize_t store_pc0count(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
unsigned long val;
@ -71,16 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev,
return count;
}
static ssize_t show_pc1event(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pc1event(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f);
}
static ssize_t store_pc1event(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
static ssize_t store_pc1event(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@ -93,16 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev,
sysreg_write(PCCR, val);
return count;
}
static ssize_t show_pc1count(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pc1count(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pcnt1;
pcnt1 = sysreg_read(PCNT1);
return sprintf(buf, "%lu\n", pcnt1);
}
static ssize_t store_pc1count(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
static ssize_t store_pc1count(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@ -116,16 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev,
return count;
}
static ssize_t show_pccycles(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pccycles(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pccnt;
pccnt = sysreg_read(PCCNT);
return sprintf(buf, "%lu\n", pccnt);
}
static ssize_t store_pccycles(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
static ssize_t store_pccycles(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@ -139,16 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev,
return count;
}
static ssize_t show_pcenable(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
static ssize_t show_pcenable(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "%c\n", (pccr & 1)?'1':'0');
}
static ssize_t store_pcenable(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
static ssize_t store_pcenable(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
unsigned long pccr, val;
@ -167,12 +167,12 @@ static ssize_t store_pcenable(struct sys_device *dev,
return count;
}
static SYSDEV_ATTR(pc0event, 0600, show_pc0event, store_pc0event);
static SYSDEV_ATTR(pc0count, 0600, show_pc0count, store_pc0count);
static SYSDEV_ATTR(pc1event, 0600, show_pc1event, store_pc1event);
static SYSDEV_ATTR(pc1count, 0600, show_pc1count, store_pc1count);
static SYSDEV_ATTR(pccycles, 0600, show_pccycles, store_pccycles);
static SYSDEV_ATTR(pcenable, 0600, show_pcenable, store_pcenable);
static DEVICE_ATTR(pc0event, 0600, show_pc0event, store_pc0event);
static DEVICE_ATTR(pc0count, 0600, show_pc0count, store_pc0count);
static DEVICE_ATTR(pc1event, 0600, show_pc1event, store_pc1event);
static DEVICE_ATTR(pc1count, 0600, show_pc1count, store_pc1count);
static DEVICE_ATTR(pccycles, 0600, show_pccycles, store_pccycles);
static DEVICE_ATTR(pcenable, 0600, show_pcenable, store_pcenable);
#endif /* CONFIG_PERFORMANCE_COUNTERS */
@ -186,12 +186,12 @@ static int __init topology_init(void)
register_cpu(c, cpu);
#ifdef CONFIG_PERFORMANCE_COUNTERS
sysdev_create_file(&c->sysdev, &attr_pc0event);
sysdev_create_file(&c->sysdev, &attr_pc0count);
sysdev_create_file(&c->sysdev, &attr_pc1event);
sysdev_create_file(&c->sysdev, &attr_pc1count);
sysdev_create_file(&c->sysdev, &attr_pccycles);
sysdev_create_file(&c->sysdev, &attr_pcenable);
device_create_file(&c->dev, &dev_attr_pc0event);
device_create_file(&c->dev, &dev_attr_pc0count);
device_create_file(&c->dev, &dev_attr_pc1event);
device_create_file(&c->dev, &dev_attr_pc1count);
device_create_file(&c->dev, &dev_attr_pccycles);
device_create_file(&c->dev, &dev_attr_pcenable);
#endif
}

View file

@ -14,7 +14,7 @@
#include <linux/kernel_stat.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/sysdev.h>
#include <linux/device.h>
/* May be overridden by platform code */
int __weak nmi_enable(void)

View file

@ -24,7 +24,7 @@
* Copyright (C) 2006, Intel Corp. All rights reserved.
*
*/
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/cpu.h>
@ -35,10 +35,10 @@
#define ERR_DATA_BUFFER_SIZE 3 // Three 8-byte;
#define define_one_ro(name) \
static SYSDEV_ATTR(name, 0444, show_##name, NULL)
static DEVICE_ATTR(name, 0444, show_##name, NULL)
#define define_one_rw(name) \
static SYSDEV_ATTR(name, 0644, show_##name, store_##name)
static DEVICE_ATTR(name, 0644, show_##name, store_##name)
static u64 call_start[NR_CPUS];
static u64 phys_addr[NR_CPUS];
@ -55,7 +55,7 @@ static u64 resources[NR_CPUS];
#define show(name) \
static ssize_t \
show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
show_##name(struct device *dev, struct device_attribute *attr, \
char *buf) \
{ \
u32 cpu=dev->id; \
@ -64,7 +64,7 @@ show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
#define store(name) \
static ssize_t \
store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \
store_##name(struct device *dev, struct device_attribute *attr, \
const char *buf, size_t size) \
{ \
unsigned int cpu=dev->id; \
@ -78,7 +78,7 @@ show(call_start)
* processor. The cpu number in driver is only used for storing data.
*/
static ssize_t
store_call_start(struct sys_device *dev, struct sysdev_attribute *attr,
store_call_start(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int cpu=dev->id;
@ -127,7 +127,7 @@ show(err_type_info)
store(err_type_info)
static ssize_t
show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
show_virtual_to_phys(struct device *dev, struct device_attribute *attr,
char *buf)
{
unsigned int cpu=dev->id;
@ -135,7 +135,7 @@ show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
}
static ssize_t
store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr,
store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int cpu=dev->id;
@ -159,8 +159,8 @@ show(err_struct_info)
store(err_struct_info)
static ssize_t
show_err_data_buffer(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
show_err_data_buffer(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned int cpu=dev->id;
@ -171,8 +171,8 @@ show_err_data_buffer(struct sys_device *dev,
}
static ssize_t
store_err_data_buffer(struct sys_device *dev,
struct sysdev_attribute *attr,
store_err_data_buffer(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int cpu=dev->id;
@ -209,14 +209,14 @@ define_one_ro(capabilities);
define_one_ro(resources);
static struct attribute *default_attrs[] = {
&attr_call_start.attr,
&attr_virtual_to_phys.attr,
&attr_err_type_info.attr,
&attr_err_struct_info.attr,
&attr_err_data_buffer.attr,
&attr_status.attr,
&attr_capabilities.attr,
&attr_resources.attr,
&dev_attr_call_start.attr,
&dev_attr_virtual_to_phys.attr,
&dev_attr_err_type_info.attr,
&dev_attr_err_struct_info.attr,
&dev_attr_err_data_buffer.attr,
&dev_attr_status.attr,
&dev_attr_capabilities.attr,
&dev_attr_resources.attr,
NULL
};
@ -225,12 +225,12 @@ static struct attribute_group err_inject_attr_group = {
.name = "err_inject"
};
/* Add/Remove err_inject interface for CPU device */
static int __cpuinit err_inject_add_dev(struct sys_device * sys_dev)
static int __cpuinit err_inject_add_dev(struct device * sys_dev)
{
return sysfs_create_group(&sys_dev->kobj, &err_inject_attr_group);
}
static int __cpuinit err_inject_remove_dev(struct sys_device * sys_dev)
static int __cpuinit err_inject_remove_dev(struct device * sys_dev)
{
sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group);
return 0;
@ -239,9 +239,9 @@ static int __cpuinit err_inject_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
struct sys_device *sys_dev;
struct device *sys_dev;
sys_dev = get_cpu_sysdev(cpu);
sys_dev = get_cpu_device(cpu);
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
@ -283,13 +283,13 @@ static void __exit
err_inject_exit(void)
{
int i;
struct sys_device *sys_dev;
struct device *sys_dev;
#ifdef ERR_INJ_DEBUG
printk(KERN_INFO "Exit error injection driver.\n");
#endif
for_each_online_cpu(i) {
sys_dev = get_cpu_sysdev(i);
sys_dev = get_cpu_device(i);
sysfs_remove_group(&sys_dev->kobj, &err_inject_attr_group);
}
unregister_hotcpu_notifier(&err_inject_cpu_notifier);

View file

@ -350,7 +350,7 @@ static int __cpuinit cpu_cache_sysfs_init(unsigned int cpu)
}
/* Add cache interface for CPU device */
static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
static int __cpuinit cache_add_dev(struct device * sys_dev)
{
unsigned int cpu = sys_dev->id;
unsigned long i, j;
@ -400,7 +400,7 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev)
}
/* Remove cache interface for CPU device */
static int __cpuinit cache_remove_dev(struct sys_device * sys_dev)
static int __cpuinit cache_remove_dev(struct device * sys_dev)
{
unsigned int cpu = sys_dev->id;
unsigned long i;
@ -428,9 +428,9 @@ static int __cpuinit cache_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
struct sys_device *sys_dev;
struct device *sys_dev;
sys_dev = get_cpu_sysdev(cpu);
sys_dev = get_cpu_device(cpu);
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
@ -454,7 +454,7 @@ static int __init cache_sysfs_init(void)
int i;
for_each_online_cpu(i) {
struct sys_device *sys_dev = get_cpu_sysdev((unsigned int)i);
struct device *sys_dev = get_cpu_device((unsigned int)i);
cache_add_dev(sys_dev);
}

View file

@ -15,7 +15,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <asm/gpio.h>
#include <asm/pinmux.h>
@ -115,13 +115,14 @@ void mcf_gpio_free(struct gpio_chip *chip, unsigned offset)
mcf_pinmux_release(mcf_chip->gpio_to_pinmux[offset], 0);
}
struct sysdev_class mcf_gpio_sysclass = {
.name = "gpio",
struct bus_type mcf_gpio_subsys = {
.name = "gpio",
.dev_name = "gpio",
};
static int __init mcf_gpio_sysinit(void)
{
return sysdev_class_register(&mcf_gpio_sysclass);
return subsys_system_register(&mcf_gpio_subsys, NULL);
}
core_initcall(mcf_gpio_sysinit);

View file

@ -9,7 +9,7 @@
* (C) Copyright TOSHIBA CORPORATION 2005-2007
* All Rights Reserved.
*/
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/map_to_7segment.h>
#include <asm/txx9/generic.h>
@ -37,8 +37,8 @@ int txx9_7segled_putc(unsigned int pos, char c)
return 0;
}
static ssize_t ascii_store(struct sys_device *dev,
struct sysdev_attribute *attr,
static ssize_t ascii_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int ch = dev->id;
@ -46,8 +46,8 @@ static ssize_t ascii_store(struct sys_device *dev,
return size;
}
static ssize_t raw_store(struct sys_device *dev,
struct sysdev_attribute *attr,
static ssize_t raw_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int ch = dev->id;
@ -55,19 +55,19 @@ static ssize_t raw_store(struct sys_device *dev,
return size;
}
static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store);
static SYSDEV_ATTR(raw, 0200, NULL, raw_store);
static DEVICE_ATTR(ascii, 0200, NULL, ascii_store);
static DEVICE_ATTR(raw, 0200, NULL, raw_store);
static ssize_t map_seg7_show(struct sysdev_class *class,
struct sysdev_class_attribute *attr,
static ssize_t map_seg7_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
memcpy(buf, &txx9_seg7map, sizeof(txx9_seg7map));
return sizeof(txx9_seg7map);
}
static ssize_t map_seg7_store(struct sysdev_class *class,
struct sysdev_class_attribute *attr,
static ssize_t map_seg7_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
if (size != sizeof(txx9_seg7map))
@ -76,10 +76,11 @@ static ssize_t map_seg7_store(struct sysdev_class *class,
return size;
}
static SYSDEV_CLASS_ATTR(map_seg7, 0600, map_seg7_show, map_seg7_store);
static DEVICE_ATTR(map_seg7, 0600, map_seg7_show, map_seg7_store);
static struct sysdev_class tx_7segled_sysdev_class = {
.name = "7segled",
static struct bus_type tx_7segled_subsys = {
.name = "7segled",
.dev_name = "7segled",
};
static int __init tx_7segled_init_sysfs(void)
@ -87,26 +88,25 @@ static int __init tx_7segled_init_sysfs(void)
int error, i;
if (!tx_7segled_num)
return -ENODEV;
error = sysdev_class_register(&tx_7segled_sysdev_class);
error = subsys_system_register(&tx_7segled_subsys, NULL);
if (error)
return error;
error = sysdev_class_create_file(&tx_7segled_sysdev_class,
&attr_map_seg7);
error = device_create_file(tx_7segled_subsys.dev_root, &dev_attr_map_seg7);
if (error)
return error;
for (i = 0; i < tx_7segled_num; i++) {
struct sys_device *dev;
struct device *dev;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev) {
error = -ENODEV;
break;
}
dev->id = i;
dev->cls = &tx_7segled_sysdev_class;
error = sysdev_register(dev);
dev->dev = &tx_7segled_subsys;
error = device_register(dev);
if (!error) {
sysdev_create_file(dev, &attr_ascii);
sysdev_create_file(dev, &attr_raw);
device_create_file(dev, &dev_attr_ascii);
device_create_file(dev, &dev_attr_raw);
}
}
return error;

View file

@ -22,7 +22,7 @@
#include <linux/serial_core.h>
#include <linux/mtd/physmap.h>
#include <linux/leds.h>
#include <linux/sysdev.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/irq.h>
#include <asm/bootinfo.h>
@ -897,10 +897,13 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq,
#endif
}
static struct sysdev_class txx9_sramc_sysdev_class;
static struct bus_type txx9_sramc_subsys = {
.name = "txx9_sram",
.dev_name = "txx9_sram",
};
struct txx9_sramc_sysdev {
struct sys_device dev;
struct txx9_sramc_dev {
struct device dev;
struct bin_attribute bindata_attr;
void __iomem *base;
};
@ -909,7 +912,7 @@ static ssize_t txx9_sram_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t pos, size_t size)
{
struct txx9_sramc_sysdev *dev = bin_attr->private;
struct txx9_sramc_dev *dev = bin_attr->private;
size_t ramsize = bin_attr->size;
if (pos >= ramsize)
@ -924,7 +927,7 @@ static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf, loff_t pos, size_t size)
{
struct txx9_sramc_sysdev *dev = bin_attr->private;
struct txx9_sramc_dev *dev = bin_attr->private;
size_t ramsize = bin_attr->size;
if (pos >= ramsize)
@ -937,18 +940,13 @@ static ssize_t txx9_sram_write(struct file *filp, struct kobject *kobj,
void __init txx9_sramc_init(struct resource *r)
{
struct txx9_sramc_sysdev *dev;
struct txx9_sramc_dev *dev;
size_t size;
int err;
if (!txx9_sramc_sysdev_class.name) {
txx9_sramc_sysdev_class.name = "txx9_sram";
err = sysdev_class_register(&txx9_sramc_sysdev_class);
if (err) {
txx9_sramc_sysdev_class.name = NULL;
return;
}
}
err = subsys_system_register(&txx9_sramc_subsys, NULL);
if (err)
return;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev)
return;
@ -956,7 +954,7 @@ void __init txx9_sramc_init(struct resource *r)
dev->base = ioremap(r->start, size);
if (!dev->base)
goto exit;
dev->dev.cls = &txx9_sramc_sysdev_class;
dev->dev.bus = &txx9_sramc_subsys;
sysfs_bin_attr_init(&dev->bindata_attr);
dev->bindata_attr.attr.name = "bindata";
dev->bindata_attr.attr.mode = S_IRUSR | S_IWUSR;
@ -964,12 +962,12 @@ void __init txx9_sramc_init(struct resource *r)
dev->bindata_attr.write = txx9_sram_write;
dev->bindata_attr.size = size;
dev->bindata_attr.private = dev;
err = sysdev_register(&dev->dev);
err = device_register(&dev->dev);
if (err)
goto exit;
err = sysfs_create_bin_file(&dev->dev.kobj, &dev->bindata_attr);
if (err) {
sysdev_unregister(&dev->dev);
device_unregister(&dev->dev);
goto exit;
}
return;

Some files were not shown because too many files have changed in this diff Show more