Skip to content

Commit 7affca3

Browse files
committed
Merge branch 'driver-core-next' of git://git.kernel.org/pub/scm/linux/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
2 parents 356b954 + ff4b8a5 commit 7affca3

517 files changed

Lines changed: 3169 additions & 6891 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/HOWTO‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ versions.
275275
If no 2.6.x.y kernel is available, then the highest numbered 2.6.x
276276
kernel is the current stable kernel.
277277

278-
2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are
279-
released as needs dictate. The normal release period is approximately
278+
2.6.x.y are maintained by the "stable" team <stable@vger.kernel.org>, and
279+
are released as needs dictate. The normal release period is approximately
280280
two weeks, but it can be longer if there are no pressing problems. A
281281
security-related problem, instead, can cause a release to happen almost
282282
instantly.

‎Documentation/development-process/5.Posting‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ copies should go to:
271271
the linux-kernel list.
272272

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

279279
When selecting recipients for a patch, it is good to have an idea of who
280280
you think will eventually accept the patch and get it merged. While it

‎Documentation/driver-model/devres.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ IOMAP
262262
devm_ioremap()
263263
devm_ioremap_nocache()
264264
devm_iounmap()
265+
devm_request_and_ioremap() : checks resource, requests region, ioremaps
265266
pcim_iomap()
266267
pcim_iounmap()
267268
pcim_iomap_table() : array of mapped addresses indexed by BAR

‎Documentation/filesystems/debugfs.txt‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ A read on the resulting file will yield either Y (for non-zero values) or
9797
N, followed by a newline. If written to, it will accept either upper- or
9898
lower-case values, or 1 or 0. Any other input will be silently ignored.
9999

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

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

119+
If you want to dump a block of registers (something that happens quite
120+
often during development, even if little such code reaches mainline.
121+
Debugfs offers two functions: one to make a registers-only file, and
122+
another to insert a register block in the middle of another sequential
123+
file.
124+
125+
struct debugfs_reg32 {
126+
char *name;
127+
unsigned long offset;
128+
};
129+
130+
struct debugfs_regset32 {
131+
struct debugfs_reg32 *regs;
132+
int nregs;
133+
void __iomem *base;
134+
};
135+
136+
struct dentry *debugfs_create_regset32(const char *name, mode_t mode,
137+
struct dentry *parent,
138+
struct debugfs_regset32 *regset);
139+
140+
int debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs,
141+
int nregs, void __iomem *base, char *prefix);
142+
143+
The "base" argument may be 0, but you may want to build the reg32 array
144+
using __stringify, and a number of register names (macros) are actually
145+
byte offsets over a base for the register block.
146+
147+
118148
There are a couple of other directory-oriented helper functions:
119149

120150
struct dentry *debugfs_rename(struct dentry *old_dir,

‎MAINTAINERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6259,7 +6259,7 @@ F: arch/alpha/kernel/srm_env.c
62596259

62606260
STABLE BRANCH
62616261
M: Greg Kroah-Hartman <greg@kroah.com>
6262-
L: stable@kernel.org
6262+
L: stable@vger.kernel.org
62636263
S: Maintained
62646264

62656265
STAGING SUBSYSTEM

‎arch/arm/include/asm/mach/time.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#ifndef __ASM_ARM_MACH_TIME_H
1111
#define __ASM_ARM_MACH_TIME_H
1212

13-
#include <linux/sysdev.h>
14-
1513
/*
1614
* This is our kernel timer structure.
1715
*

‎arch/arm/kernel/leds.c‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
#include <linux/export.h>
1111
#include <linux/init.h>
12-
#include <linux/sysdev.h>
12+
#include <linux/device.h>
1313
#include <linux/syscore_ops.h>
1414
#include <linux/string.h>
1515

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

37-
static ssize_t leds_store(struct sys_device *dev,
38-
struct sysdev_attribute *attr,
37+
static ssize_t leds_store(struct device *dev,
38+
struct device_attribute *attr,
3939
const char *buf, size_t size)
4040
{
4141
int ret = -EINVAL, len = strcspn(buf, " ");
@@ -69,15 +69,16 @@ static ssize_t leds_store(struct sys_device *dev,
6969
return ret;
7070
}
7171

72-
static SYSDEV_ATTR(event, 0200, NULL, leds_store);
72+
static DEVICE_ATTR(event, 0200, NULL, leds_store);
7373

74-
static struct sysdev_class leds_sysclass = {
74+
static struct bus_type leds_subsys = {
7575
.name = "leds",
76+
.dev_name = "leds",
7677
};
7778

78-
static struct sys_device leds_device = {
79+
static struct device leds_device = {
7980
.id = 0,
80-
.cls = &leds_sysclass,
81+
.bus = &leds_subsys,
8182
};
8283

8384
static int leds_suspend(void)
@@ -105,11 +106,11 @@ static struct syscore_ops leds_syscore_ops = {
105106
static int __init leds_init(void)
106107
{
107108
int ret;
108-
ret = sysdev_class_register(&leds_sysclass);
109+
ret = subsys_system_register(&leds_subsys, NULL);
109110
if (ret == 0)
110-
ret = sysdev_register(&leds_device);
111+
ret = device_register(&leds_device);
111112
if (ret == 0)
112-
ret = sysdev_create_file(&leds_device, &attr_event);
113+
ret = device_create_file(&leds_device, &dev_attr_event);
113114
if (ret == 0)
114115
register_syscore_ops(&leds_syscore_ops);
115116
return ret;

‎arch/arm/mach-bcmring/core.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <linux/device.h>
2626
#include <linux/dma-mapping.h>
2727
#include <linux/platform_device.h>
28-
#include <linux/sysdev.h>
2928
#include <linux/interrupt.h>
3029
#include <linux/amba/bus.h>
3130
#include <linux/clkdev.h>

‎arch/arm/mach-exynos/common.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/interrupt.h>
1414
#include <linux/irq.h>
1515
#include <linux/io.h>
16-
#include <linux/sysdev.h>
16+
#include <linux/device.h>
1717
#include <linux/gpio.h>
1818
#include <linux/sched.h>
1919
#include <linux/serial_core.h>
@@ -423,17 +423,18 @@ void __init exynos4_init_irq(void)
423423
s5p_init_irq(NULL, 0);
424424
}
425425

426-
struct sysdev_class exynos4_sysclass = {
427-
.name = "exynos4-core",
426+
struct bus_type exynos4_subsys = {
427+
.name = "exynos4-core",
428+
.dev_name = "exynos4-core",
428429
};
429430

430-
static struct sys_device exynos4_sysdev = {
431-
.cls = &exynos4_sysclass,
431+
static struct device exynos4_dev = {
432+
.bus = &exynos4_subsys,
432433
};
433434

434435
static int __init exynos4_core_init(void)
435436
{
436-
return sysdev_class_register(&exynos4_sysclass);
437+
return subsys_system_register(&exynos4_subsys, NULL);
437438
}
438439
core_initcall(exynos4_core_init);
439440

@@ -470,7 +471,7 @@ int __init exynos_init(void)
470471
/* set idle function */
471472
pm_idle = exynos_idle;
472473

473-
return sysdev_register(&exynos4_sysdev);
474+
return device_register(&exynos4_dev);
474475
}
475476

476477
static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = {

‎arch/arm/mach-exynos/pm.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static void exynos4_pm_prepare(void)
205205

206206
}
207207

208-
static int exynos4_pm_add(struct sys_device *sysdev)
208+
static int exynos4_pm_add(struct device *dev)
209209
{
210210
pm_cpu_prep = exynos4_pm_prepare;
211211
pm_cpu_sleep = exynos4_cpu_suspend;
@@ -301,8 +301,10 @@ static void exynos4_restore_pll(void)
301301
} while (epll_wait || vpll_wait);
302302
}
303303

304-
static struct sysdev_driver exynos4_pm_driver = {
305-
.add = exynos4_pm_add,
304+
static struct subsys_interface exynos4_pm_interface = {
305+
.name = "exynos4_pm",
306+
.subsys = &exynos4_subsys,
307+
.add_dev = exynos4_pm_add,
306308
};
307309

308310
static __init int exynos4_pm_drvinit(void)
@@ -325,7 +327,7 @@ static __init int exynos4_pm_drvinit(void)
325327
clk_put(pll_base);
326328
}
327329

328-
return sysdev_driver_register(&exynos4_sysclass, &exynos4_pm_driver);
330+
return subsys_interface_register(&exynos4_pm_interface);
329331
}
330332
arch_initcall(exynos4_pm_drvinit);
331333

0 commit comments

Comments
 (0)