mirror of https://gitee.com/openkylin/linux.git
Merge branch 'sh/driver-core' into sh/clkfwk
This commit is contained in:
commit
d28c145deb
|
@ -221,8 +221,8 @@ branches. These different branches are:
|
|||
- main 2.6.x kernel tree
|
||||
- 2.6.x.y -stable kernel tree
|
||||
- 2.6.x -git kernel patches
|
||||
- 2.6.x -mm kernel patches
|
||||
- subsystem specific kernel trees and patches
|
||||
- the 2.6.x -next kernel tree for integration tests
|
||||
|
||||
2.6.x kernel tree
|
||||
-----------------
|
||||
|
@ -232,7 +232,7 @@ process is as follows:
|
|||
- As soon as a new kernel is released a two weeks window is open,
|
||||
during this period of time maintainers can submit big diffs to
|
||||
Linus, usually the patches that have already been included in the
|
||||
-mm kernel for a few weeks. The preferred way to submit big changes
|
||||
-next kernel for a few weeks. The preferred way to submit big changes
|
||||
is using git (the kernel's source management tool, more information
|
||||
can be found at http://git.or.cz/) but plain patches are also just
|
||||
fine.
|
||||
|
@ -293,84 +293,43 @@ daily and represent the current state of Linus' tree. They are more
|
|||
experimental than -rc kernels since they are generated automatically
|
||||
without even a cursory glance to see if they are sane.
|
||||
|
||||
2.6.x -mm kernel patches
|
||||
------------------------
|
||||
These are experimental kernel patches released by Andrew Morton. Andrew
|
||||
takes all of the different subsystem kernel trees and patches and mushes
|
||||
them together, along with a lot of patches that have been plucked from
|
||||
the linux-kernel mailing list. This tree serves as a proving ground for
|
||||
new features and patches. Once a patch has proved its worth in -mm for
|
||||
a while Andrew or the subsystem maintainer pushes it on to Linus for
|
||||
inclusion in mainline.
|
||||
|
||||
It is heavily encouraged that all new patches get tested in the -mm tree
|
||||
before they are sent to Linus for inclusion in the main kernel tree. Code
|
||||
which does not make an appearance in -mm before the opening of the merge
|
||||
window will prove hard to merge into the mainline.
|
||||
|
||||
These kernels are not appropriate for use on systems that are supposed
|
||||
to be stable and they are more risky to run than any of the other
|
||||
branches.
|
||||
|
||||
If you wish to help out with the kernel development process, please test
|
||||
and use these kernel releases and provide feedback to the linux-kernel
|
||||
mailing list if you have any problems, and if everything works properly.
|
||||
|
||||
In addition to all the other experimental patches, these kernels usually
|
||||
also contain any changes in the mainline -git kernels available at the
|
||||
time of release.
|
||||
|
||||
The -mm kernels are not released on a fixed schedule, but usually a few
|
||||
-mm kernels are released in between each -rc kernel (1 to 3 is common).
|
||||
|
||||
Subsystem Specific kernel trees and patches
|
||||
-------------------------------------------
|
||||
A number of the different kernel subsystem developers expose their
|
||||
development trees so that others can see what is happening in the
|
||||
different areas of the kernel. These trees are pulled into the -mm
|
||||
kernel releases as described above.
|
||||
The maintainers of the various kernel subsystems --- and also many
|
||||
kernel subsystem developers --- expose their current state of
|
||||
development in source repositories. That way, others can see what is
|
||||
happening in the different areas of the kernel. In areas where
|
||||
development is rapid, a developer may be asked to base his submissions
|
||||
onto such a subsystem kernel tree so that conflicts between the
|
||||
submission and other already ongoing work are avoided.
|
||||
|
||||
Here is a list of some of the different kernel trees available:
|
||||
git trees:
|
||||
- Kbuild development tree, Sam Ravnborg <sam@ravnborg.org>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git
|
||||
Most of these repositories are git trees, but there are also other SCMs
|
||||
in use, or patch queues being published as quilt series. Addresses of
|
||||
these subsystem repositories are listed in the MAINTAINERS file. Many
|
||||
of them can be browsed at http://git.kernel.org/.
|
||||
|
||||
- ACPI development tree, Len Brown <len.brown@intel.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
|
||||
Before a proposed patch is committed to such a subsystem tree, it is
|
||||
subject to review which primarily happens on mailing lists (see the
|
||||
respective section below). For several kernel subsystems, this review
|
||||
process is tracked with the tool patchwork. Patchwork offers a web
|
||||
interface which shows patch postings, any comments on a patch or
|
||||
revisions to it, and maintainers can mark patches as under review,
|
||||
accepted, or rejected. Most of these patchwork sites are listed at
|
||||
http://patchwork.kernel.org/ or http://patchwork.ozlabs.org/.
|
||||
|
||||
- Block development tree, Jens Axboe <jens.axboe@oracle.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
|
||||
2.6.x -next kernel tree for integration tests
|
||||
---------------------------------------------
|
||||
Before updates from subsystem trees are merged into the mainline 2.6.x
|
||||
tree, they need to be integration-tested. For this purpose, a special
|
||||
testing repository exists into which virtually all subsystem trees are
|
||||
pulled on an almost daily basis:
|
||||
http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git
|
||||
http://linux.f-seidel.de/linux-next/pmwiki/
|
||||
|
||||
- DRM development tree, Dave Airlie <airlied@linux.ie>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6.git
|
||||
This way, the -next kernel gives a summary outlook onto what will be
|
||||
expected to go into the mainline kernel at the next merge period.
|
||||
Adventurous testers are very welcome to runtime-test the -next kernel.
|
||||
|
||||
- ia64 development tree, Tony Luck <tony.luck@intel.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
|
||||
|
||||
- infiniband, Roland Dreier <rolandd@cisco.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
|
||||
|
||||
- libata, Jeff Garzik <jgarzik@pobox.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
|
||||
|
||||
- network drivers, Jeff Garzik <jgarzik@pobox.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git
|
||||
|
||||
- pcmcia, Dominik Brodowski <linux@dominikbrodowski.net>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git
|
||||
|
||||
- SCSI, James Bottomley <James.Bottomley@hansenpartnership.com>
|
||||
git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
|
||||
|
||||
- x86, Ingo Molnar <mingo@elte.hu>
|
||||
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
|
||||
|
||||
quilt trees:
|
||||
- USB, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de>
|
||||
kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
|
||||
|
||||
Other kernel trees can be found listed at http://git.kernel.org/ and in
|
||||
the MAINTAINERS file.
|
||||
|
||||
Bug Reporting
|
||||
-------------
|
||||
|
|
|
@ -266,7 +266,7 @@ kobj_type:
|
|||
|
||||
struct kobj_type {
|
||||
void (*release)(struct kobject *);
|
||||
struct sysfs_ops *sysfs_ops;
|
||||
const struct sysfs_ops *sysfs_ops;
|
||||
struct attribute **default_attrs;
|
||||
};
|
||||
|
||||
|
|
|
@ -1812,7 +1812,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
Module snd-ua101
|
||||
----------------
|
||||
|
||||
Module for the Edirol UA-101 audio/MIDI interface.
|
||||
Module for the Edirol UA-101/UA-1000 audio/MIDI interfaces.
|
||||
|
||||
This module supports multiple devices, autoprobe and hotplugging.
|
||||
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 33
|
||||
EXTRAVERSION =
|
||||
SUBLEVEL = 34
|
||||
EXTRAVERSION = -rc1
|
||||
NAME = Man-Eating Seals of Antiquity
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -65,6 +65,8 @@
|
|||
#define TS72XX_RTC_DATA_PHYS_BASE 0x11700000
|
||||
#define TS72XX_RTC_DATA_SIZE 0x00001000
|
||||
|
||||
#define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000
|
||||
#define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
@ -166,6 +166,26 @@ static struct platform_device ts72xx_rtc_device = {
|
|||
.num_resources = 0,
|
||||
};
|
||||
|
||||
static struct resource ts72xx_wdt_resources[] = {
|
||||
{
|
||||
.start = TS72XX_WDT_CONTROL_PHYS_BASE,
|
||||
.end = TS72XX_WDT_CONTROL_PHYS_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
{
|
||||
.start = TS72XX_WDT_FEED_PHYS_BASE,
|
||||
.end = TS72XX_WDT_FEED_PHYS_BASE + SZ_4K - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device ts72xx_wdt_device = {
|
||||
.name = "ts72xx-wdt",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(ts72xx_wdt_resources),
|
||||
.resource = ts72xx_wdt_resources,
|
||||
};
|
||||
|
||||
static struct ep93xx_eth_data ts72xx_eth_data = {
|
||||
.phy_id = 1,
|
||||
};
|
||||
|
@ -175,6 +195,7 @@ static void __init ts72xx_init_machine(void)
|
|||
ep93xx_init_devices();
|
||||
ts72xx_register_flash();
|
||||
platform_device_register(&ts72xx_rtc_device);
|
||||
platform_device_register(&ts72xx_wdt_device);
|
||||
|
||||
ep93xx_register_eth(&ts72xx_eth_data, 1);
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
|
|||
ssp_machinfo = machinfo;
|
||||
}
|
||||
|
||||
static int __init corgi_ssp_probe(struct platform_device *dev)
|
||||
static int __devinit corgi_ssp_probe(struct platform_device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -900,7 +900,7 @@ static struct platform_suspend_ops sharpsl_pm_ops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static int __init sharpsl_pm_probe(struct platform_device *pdev)
|
||||
static int __devinit sharpsl_pm_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static const struct rfkill_ops h1940bt_rfkill_ops = {
|
|||
.set_block = h1940bt_set_block,
|
||||
};
|
||||
|
||||
static int __init h1940bt_probe(struct platform_device *pdev)
|
||||
static int __devinit h1940bt_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct rfkill *rfk;
|
||||
int ret = 0;
|
||||
|
|
|
@ -130,7 +130,7 @@ void jornada_ssp_end(void)
|
|||
};
|
||||
EXPORT_SYMBOL(jornada_ssp_end);
|
||||
|
||||
static int __init jornada_ssp_probe(struct platform_device *dev)
|
||||
static int __devinit jornada_ssp_probe(struct platform_device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -282,7 +282,7 @@ static ssize_t cache_show(struct kobject * kobj, struct attribute * attr, char *
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops cache_sysfs_ops = {
|
||||
static const struct sysfs_ops cache_sysfs_ops = {
|
||||
.show = cache_show
|
||||
};
|
||||
|
||||
|
|
|
@ -58,13 +58,16 @@ static ssize_t raw_store(struct sys_device *dev,
|
|||
static SYSDEV_ATTR(ascii, 0200, NULL, ascii_store);
|
||||
static SYSDEV_ATTR(raw, 0200, NULL, raw_store);
|
||||
|
||||
static ssize_t map_seg7_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t map_seg7_show(struct sysdev_class *class,
|
||||
struct sysdev_class_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,
|
||||
const char *buf, size_t size)
|
||||
{
|
||||
if (size != sizeof(txx9_seg7map))
|
||||
|
|
|
@ -642,7 +642,7 @@ static struct kobj_attribute *cache_index_opt_attrs[] = {
|
|||
&cache_assoc_attr,
|
||||
};
|
||||
|
||||
static struct sysfs_ops cache_index_ops = {
|
||||
static const struct sysfs_ops cache_index_ops = {
|
||||
.show = cache_index_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ static ssize_t mpc52xx_wdt_write(struct file *file, const char __user *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct watchdog_info mpc5200_wdt_info = {
|
||||
static const struct watchdog_info mpc5200_wdt_info = {
|
||||
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
||||
.identity = WDT_IDENTITY,
|
||||
};
|
||||
|
|
|
@ -321,11 +321,6 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
|
|||
#define QDIO_ERROR_ACTIVATE_CHECK_CONDITION 0x40
|
||||
#define QDIO_ERROR_SLSB_STATE 0x80
|
||||
|
||||
/* for qdio_initialize */
|
||||
#define QDIO_INBOUND_0COPY_SBALS 0x01
|
||||
#define QDIO_OUTBOUND_0COPY_SBALS 0x02
|
||||
#define QDIO_USE_OUTBOUND_PCIS 0x04
|
||||
|
||||
/* for qdio_cleanup */
|
||||
#define QDIO_FLAG_CLEANUP_USING_CLEAR 0x01
|
||||
#define QDIO_FLAG_CLEANUP_USING_HALT 0x02
|
||||
|
@ -344,7 +339,6 @@ typedef void qdio_handler_t(struct ccw_device *, unsigned int, int,
|
|||
* @input_handler: handler to be called for input queues
|
||||
* @output_handler: handler to be called for output queues
|
||||
* @int_parm: interruption parameter
|
||||
* @flags: initialization flags
|
||||
* @input_sbal_addr_array: address of no_input_qs * 128 pointers
|
||||
* @output_sbal_addr_array: address of no_output_qs * 128 pointers
|
||||
*/
|
||||
|
@ -361,7 +355,6 @@ struct qdio_initialize {
|
|||
qdio_handler_t *input_handler;
|
||||
qdio_handler_t *output_handler;
|
||||
unsigned long int_parm;
|
||||
unsigned long flags;
|
||||
void **input_sbal_addr_array;
|
||||
void **output_sbal_addr_array;
|
||||
};
|
||||
|
|
|
@ -1020,7 +1020,9 @@ int __ref smp_rescan_cpus(void)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static ssize_t __ref rescan_store(struct sysdev_class *class, const char *buf,
|
||||
static ssize_t __ref rescan_store(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
int rc;
|
||||
|
@ -1031,7 +1033,9 @@ static ssize_t __ref rescan_store(struct sysdev_class *class, const char *buf,
|
|||
static SYSDEV_CLASS_ATTR(rescan, 0200, NULL, rescan_store);
|
||||
#endif /* CONFIG_HOTPLUG_CPU */
|
||||
|
||||
static ssize_t dispatching_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t dispatching_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
ssize_t count;
|
||||
|
||||
|
@ -1041,7 +1045,9 @@ static ssize_t dispatching_show(struct sysdev_class *class, char *buf)
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t dispatching_store(struct sysdev_class *dev, const char *buf,
|
||||
static ssize_t dispatching_store(struct sysdev_class *dev,
|
||||
struct sysdev_class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
int val, rc;
|
||||
|
|
|
@ -73,15 +73,15 @@ unsigned long long monotonic_clock(void)
|
|||
}
|
||||
EXPORT_SYMBOL(monotonic_clock);
|
||||
|
||||
void tod_to_timeval(__u64 todval, struct timespec *xtime)
|
||||
void tod_to_timeval(__u64 todval, struct timespec *xt)
|
||||
{
|
||||
unsigned long long sec;
|
||||
|
||||
sec = todval >> 12;
|
||||
do_div(sec, 1000000);
|
||||
xtime->tv_sec = sec;
|
||||
xt->tv_sec = sec;
|
||||
todval -= (sec * 1000000) << 12;
|
||||
xtime->tv_nsec = ((todval * 1000) >> 12);
|
||||
xt->tv_nsec = ((todval * 1000) >> 12);
|
||||
}
|
||||
EXPORT_SYMBOL(tod_to_timeval);
|
||||
|
||||
|
@ -216,8 +216,8 @@ void update_vsyscall(struct timespec *wall_time, struct clocksource *clock,
|
|||
++vdso_data->tb_update_count;
|
||||
smp_wmb();
|
||||
vdso_data->xtime_tod_stamp = clock->cycle_last;
|
||||
vdso_data->xtime_clock_sec = xtime.tv_sec;
|
||||
vdso_data->xtime_clock_nsec = xtime.tv_nsec;
|
||||
vdso_data->xtime_clock_sec = wall_time->tv_sec;
|
||||
vdso_data->xtime_clock_nsec = wall_time->tv_nsec;
|
||||
vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
|
||||
vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
|
||||
smp_wmb();
|
||||
|
@ -1116,14 +1116,18 @@ static struct sys_device etr_port1_dev = {
|
|||
/*
|
||||
* ETR class attributes
|
||||
*/
|
||||
static ssize_t etr_stepping_port_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t etr_stepping_port_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%i\n", etr_port0.esw.p);
|
||||
}
|
||||
|
||||
static SYSDEV_CLASS_ATTR(stepping_port, 0400, etr_stepping_port_show, NULL);
|
||||
|
||||
static ssize_t etr_stepping_mode_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t etr_stepping_mode_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
char *mode_str;
|
||||
|
||||
|
@ -1584,7 +1588,9 @@ static struct sysdev_class stp_sysclass = {
|
|||
.name = "stp",
|
||||
};
|
||||
|
||||
static ssize_t stp_ctn_id_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_ctn_id_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
|
@ -1594,7 +1600,9 @@ static ssize_t stp_ctn_id_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(ctn_id, 0400, stp_ctn_id_show, NULL);
|
||||
|
||||
static ssize_t stp_ctn_type_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_ctn_type_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
|
@ -1603,7 +1611,9 @@ static ssize_t stp_ctn_type_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(ctn_type, 0400, stp_ctn_type_show, NULL);
|
||||
|
||||
static ssize_t stp_dst_offset_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_dst_offset_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x2000))
|
||||
return -ENODATA;
|
||||
|
@ -1612,7 +1622,9 @@ static ssize_t stp_dst_offset_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(dst_offset, 0400, stp_dst_offset_show, NULL);
|
||||
|
||||
static ssize_t stp_leap_seconds_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_leap_seconds_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x8000))
|
||||
return -ENODATA;
|
||||
|
@ -1621,7 +1633,9 @@ static ssize_t stp_leap_seconds_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(leap_seconds, 0400, stp_leap_seconds_show, NULL);
|
||||
|
||||
static ssize_t stp_stratum_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_stratum_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
|
@ -1630,7 +1644,9 @@ static ssize_t stp_stratum_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(stratum, 0400, stp_stratum_show, NULL);
|
||||
|
||||
static ssize_t stp_time_offset_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_time_offset_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x0800))
|
||||
return -ENODATA;
|
||||
|
@ -1639,7 +1655,9 @@ static ssize_t stp_time_offset_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(time_offset, 0400, stp_time_offset_show, NULL);
|
||||
|
||||
static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_time_zone_offset_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x4000))
|
||||
return -ENODATA;
|
||||
|
@ -1649,7 +1667,9 @@ static ssize_t stp_time_zone_offset_show(struct sysdev_class *class, char *buf)
|
|||
static SYSDEV_CLASS_ATTR(time_zone_offset, 0400,
|
||||
stp_time_zone_offset_show, NULL);
|
||||
|
||||
static ssize_t stp_timing_mode_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_timing_mode_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
|
@ -1658,7 +1678,9 @@ static ssize_t stp_timing_mode_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(timing_mode, 0400, stp_timing_mode_show, NULL);
|
||||
|
||||
static ssize_t stp_timing_state_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_timing_state_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
|
@ -1667,12 +1689,15 @@ static ssize_t stp_timing_state_show(struct sysdev_class *class, char *buf)
|
|||
|
||||
static SYSDEV_CLASS_ATTR(timing_state, 0400, stp_timing_state_show, NULL);
|
||||
|
||||
static ssize_t stp_online_show(struct sysdev_class *class, char *buf)
|
||||
static ssize_t stp_online_show(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%i\n", stp_online);
|
||||
}
|
||||
|
||||
static ssize_t stp_online_store(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int value;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
# Makefile for s390-specific library files..
|
||||
#
|
||||
|
||||
lib-y += delay.o string.o uaccess_std.o uaccess_pt.o usercopy.o
|
||||
lib-y += delay.o string.o uaccess_std.o uaccess_pt.o
|
||||
obj-y += usercopy.o
|
||||
obj-$(CONFIG_32BIT) += div64.o qrnnd.o ucmpdi2.o
|
||||
lib-$(CONFIG_64BIT) += uaccess_mvcos.o
|
||||
lib-$(CONFIG_SMP) += spinlock.o
|
||||
|
|
|
@ -374,7 +374,7 @@ static struct ctl_table cmm_dir_table[] = {
|
|||
#ifdef CONFIG_CMM_IUCV
|
||||
#define SMSG_PREFIX "CMM"
|
||||
static void
|
||||
cmm_smsg_target(char *from, char *msg)
|
||||
cmm_smsg_target(const char *from, char *msg)
|
||||
{
|
||||
long nr, seconds;
|
||||
|
||||
|
|
|
@ -128,7 +128,6 @@ static struct platform_device eth_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt0_platform_data = {
|
||||
.name = "CMT0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -138,7 +137,6 @@ static struct sh_timer_config cmt0_platform_data = {
|
|||
|
||||
static struct resource cmt0_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT0",
|
||||
.start = 0xf84a0072,
|
||||
.end = 0xf84a0077,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -160,7 +158,6 @@ static struct platform_device cmt0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt1_platform_data = {
|
||||
.name = "CMT1",
|
||||
.channel_offset = 0x08,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -170,7 +167,6 @@ static struct sh_timer_config cmt1_platform_data = {
|
|||
|
||||
static struct resource cmt1_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT1",
|
||||
.start = 0xf84a0078,
|
||||
.end = 0xf84a007d,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -115,7 +115,6 @@ static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
|
|||
mask_registers, prio_registers, NULL);
|
||||
|
||||
static struct sh_timer_config mtu2_0_platform_data = {
|
||||
.name = "MTU2_0",
|
||||
.channel_offset = -0x80,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -124,7 +123,6 @@ static struct sh_timer_config mtu2_0_platform_data = {
|
|||
|
||||
static struct resource mtu2_0_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_0",
|
||||
.start = 0xff801300,
|
||||
.end = 0xff801326,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -146,7 +144,6 @@ static struct platform_device mtu2_0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_1_platform_data = {
|
||||
.name = "MTU2_1",
|
||||
.channel_offset = -0x100,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -155,7 +152,6 @@ static struct sh_timer_config mtu2_1_platform_data = {
|
|||
|
||||
static struct resource mtu2_1_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_1",
|
||||
.start = 0xff801380,
|
||||
.end = 0xff801390,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -177,7 +173,6 @@ static struct platform_device mtu2_1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_2_platform_data = {
|
||||
.name = "MTU2_2",
|
||||
.channel_offset = 0x80,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -186,7 +181,6 @@ static struct sh_timer_config mtu2_2_platform_data = {
|
|||
|
||||
static struct resource mtu2_2_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_2",
|
||||
.start = 0xff801000,
|
||||
.end = 0xff80100a,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -318,7 +318,6 @@ static struct platform_device rtc_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_0_platform_data = {
|
||||
.name = "MTU2_0",
|
||||
.channel_offset = -0x80,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -327,7 +326,6 @@ static struct sh_timer_config mtu2_0_platform_data = {
|
|||
|
||||
static struct resource mtu2_0_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_0",
|
||||
.start = 0xfffe4300,
|
||||
.end = 0xfffe4326,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -349,7 +347,6 @@ static struct platform_device mtu2_0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_1_platform_data = {
|
||||
.name = "MTU2_1",
|
||||
.channel_offset = -0x100,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -358,7 +355,6 @@ static struct sh_timer_config mtu2_1_platform_data = {
|
|||
|
||||
static struct resource mtu2_1_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_1",
|
||||
.start = 0xfffe4380,
|
||||
.end = 0xfffe4390,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -380,7 +376,6 @@ static struct platform_device mtu2_1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_2_platform_data = {
|
||||
.name = "MTU2_2",
|
||||
.channel_offset = 0x80,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -389,7 +384,6 @@ static struct sh_timer_config mtu2_2_platform_data = {
|
|||
|
||||
static struct resource mtu2_2_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_2",
|
||||
.start = 0xfffe4000,
|
||||
.end = 0xfffe400a,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -234,7 +234,6 @@ static struct platform_device scif3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt0_platform_data = {
|
||||
.name = "CMT0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -244,7 +243,6 @@ static struct sh_timer_config cmt0_platform_data = {
|
|||
|
||||
static struct resource cmt0_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT0",
|
||||
.start = 0xfffec002,
|
||||
.end = 0xfffec007,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -266,7 +264,6 @@ static struct platform_device cmt0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt1_platform_data = {
|
||||
.name = "CMT1",
|
||||
.channel_offset = 0x08,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -276,7 +273,6 @@ static struct sh_timer_config cmt1_platform_data = {
|
|||
|
||||
static struct resource cmt1_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT1",
|
||||
.start = 0xfffec008,
|
||||
.end = 0xfffec00d,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -298,7 +294,6 @@ static struct platform_device cmt1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_0_platform_data = {
|
||||
.name = "MTU2_0",
|
||||
.channel_offset = -0x80,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -307,7 +302,6 @@ static struct sh_timer_config mtu2_0_platform_data = {
|
|||
|
||||
static struct resource mtu2_0_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_0",
|
||||
.start = 0xfffe4300,
|
||||
.end = 0xfffe4326,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -329,7 +323,6 @@ static struct platform_device mtu2_0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_1_platform_data = {
|
||||
.name = "MTU2_1",
|
||||
.channel_offset = -0x100,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -338,7 +331,6 @@ static struct sh_timer_config mtu2_1_platform_data = {
|
|||
|
||||
static struct resource mtu2_1_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_1",
|
||||
.start = 0xfffe4380,
|
||||
.end = 0xfffe4390,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -194,7 +194,6 @@ static struct platform_device scif3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt0_platform_data = {
|
||||
.name = "CMT0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -204,7 +203,6 @@ static struct sh_timer_config cmt0_platform_data = {
|
|||
|
||||
static struct resource cmt0_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT0",
|
||||
.start = 0xfffec002,
|
||||
.end = 0xfffec007,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -226,7 +224,6 @@ static struct platform_device cmt0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt1_platform_data = {
|
||||
.name = "CMT1",
|
||||
.channel_offset = 0x08,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -236,7 +233,6 @@ static struct sh_timer_config cmt1_platform_data = {
|
|||
|
||||
static struct resource cmt1_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT1",
|
||||
.start = 0xfffec008,
|
||||
.end = 0xfffec00d,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -258,7 +254,6 @@ static struct platform_device cmt1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_0_platform_data = {
|
||||
.name = "MTU2_0",
|
||||
.channel_offset = -0x80,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -267,7 +262,6 @@ static struct sh_timer_config mtu2_0_platform_data = {
|
|||
|
||||
static struct resource mtu2_0_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_0",
|
||||
.start = 0xfffe4300,
|
||||
.end = 0xfffe4326,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -289,7 +283,6 @@ static struct platform_device mtu2_0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_1_platform_data = {
|
||||
.name = "MTU2_1",
|
||||
.channel_offset = -0x100,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -298,7 +291,6 @@ static struct sh_timer_config mtu2_1_platform_data = {
|
|||
|
||||
static struct resource mtu2_1_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_1",
|
||||
.start = 0xfffe4380,
|
||||
.end = 0xfffe4390,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -320,7 +312,6 @@ static struct platform_device mtu2_1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config mtu2_2_platform_data = {
|
||||
.name = "MTU2_2",
|
||||
.channel_offset = 0x80,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -329,7 +320,6 @@ static struct sh_timer_config mtu2_2_platform_data = {
|
|||
|
||||
static struct resource mtu2_2_resources[] = {
|
||||
[0] = {
|
||||
.name = "MTU2_2",
|
||||
.start = 0xfffe4000,
|
||||
.end = 0xfffe400a,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -124,7 +124,6 @@ static struct platform_device rtc_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -133,7 +132,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xfffffe94,
|
||||
.end = 0xfffffe9f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -155,7 +153,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0xe,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -164,7 +161,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xfffffea0,
|
||||
.end = 0xfffffeab,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -186,7 +182,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1a,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -194,7 +189,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xfffffeac,
|
||||
.end = 0xfffffebb,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -157,7 +157,6 @@ static struct platform_device scif2_device = {
|
|||
#endif
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -166,7 +165,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xfffffe94,
|
||||
.end = 0xfffffe9f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -188,7 +186,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0xe,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -197,7 +194,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xfffffea0,
|
||||
.end = 0xfffffeab,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -219,7 +215,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1a,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -227,7 +222,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xfffffeac,
|
||||
.end = 0xfffffebb,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -127,7 +127,6 @@ static struct platform_device scif1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -136,7 +135,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xa412fe94,
|
||||
.end = 0xa412fe9f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -158,7 +156,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0xe,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -167,7 +164,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xa412fea0,
|
||||
.end = 0xa412feab,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -189,7 +185,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1a,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -197,7 +192,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xa412feac,
|
||||
.end = 0xa412feb5,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -130,7 +130,6 @@ static struct platform_device usbf_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt0_platform_data = {
|
||||
.name = "CMT0",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -140,7 +139,6 @@ static struct sh_timer_config cmt0_platform_data = {
|
|||
|
||||
static struct resource cmt0_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT0",
|
||||
.start = 0x044a0010,
|
||||
.end = 0x044a001b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -162,7 +160,6 @@ static struct platform_device cmt0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt1_platform_data = {
|
||||
.name = "CMT1",
|
||||
.channel_offset = 0x20,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -170,7 +167,6 @@ static struct sh_timer_config cmt1_platform_data = {
|
|||
|
||||
static struct resource cmt1_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT1",
|
||||
.start = 0x044a0020,
|
||||
.end = 0x044a002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -192,7 +188,6 @@ static struct platform_device cmt1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt2_platform_data = {
|
||||
.name = "CMT2",
|
||||
.channel_offset = 0x30,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -200,7 +195,6 @@ static struct sh_timer_config cmt2_platform_data = {
|
|||
|
||||
static struct resource cmt2_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT2",
|
||||
.start = 0x044a0030,
|
||||
.end = 0x044a003b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -222,7 +216,6 @@ static struct platform_device cmt2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt3_platform_data = {
|
||||
.name = "CMT3",
|
||||
.channel_offset = 0x40,
|
||||
.timer_bit = 3,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -230,7 +223,6 @@ static struct sh_timer_config cmt3_platform_data = {
|
|||
|
||||
static struct resource cmt3_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT3",
|
||||
.start = 0x044a0040,
|
||||
.end = 0x044a004b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -252,7 +244,6 @@ static struct platform_device cmt3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt4_platform_data = {
|
||||
.name = "CMT4",
|
||||
.channel_offset = 0x50,
|
||||
.timer_bit = 4,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -260,7 +251,6 @@ static struct sh_timer_config cmt4_platform_data = {
|
|||
|
||||
static struct resource cmt4_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT4",
|
||||
.start = 0x044a0050,
|
||||
.end = 0x044a005b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -282,7 +272,6 @@ static struct platform_device cmt4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x02,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -291,7 +280,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xa412fe94,
|
||||
.end = 0xa412fe9f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -313,7 +301,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0xe,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -322,7 +309,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xa412fea0,
|
||||
.end = 0xa412feab,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -344,7 +330,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1a,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -352,7 +337,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xa412feac,
|
||||
.end = 0xa412feb5,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -31,7 +31,6 @@ static struct platform_device scif0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -40,7 +39,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -62,7 +60,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -71,7 +68,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -93,7 +89,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -101,7 +96,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -66,7 +66,6 @@ static struct platform_device scif1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -75,7 +74,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -97,7 +95,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -106,7 +103,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -128,7 +124,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -136,7 +131,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -163,7 +157,6 @@ static struct platform_device tmu2_device = {
|
|||
defined(CONFIG_CPU_SUBTYPE_SH7751R)
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -171,7 +164,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xfe100008,
|
||||
.end = 0xfe100013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -193,7 +185,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -201,7 +192,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xfe100014,
|
||||
.end = 0xfe10001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -187,7 +187,6 @@ static struct platform_device scif3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -196,7 +195,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -218,7 +216,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -227,7 +224,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -249,7 +245,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -257,7 +252,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -326,7 +326,7 @@ static struct attribute *sq_sysfs_attrs[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static struct sysfs_ops sq_sysfs_ops = {
|
||||
static const struct sysfs_ops sq_sysfs_ops = {
|
||||
.show = sq_sysfs_show,
|
||||
.store = sq_sysfs_store,
|
||||
};
|
||||
|
|
|
@ -207,7 +207,6 @@ static struct platform_device jpu_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt_platform_data = {
|
||||
.name = "CMT",
|
||||
.channel_offset = 0x60,
|
||||
.timer_bit = 5,
|
||||
.clk = "cmt0",
|
||||
|
@ -217,7 +216,6 @@ static struct sh_timer_config cmt_platform_data = {
|
|||
|
||||
static struct resource cmt_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT",
|
||||
.start = 0x044a0060,
|
||||
.end = 0x044a006b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -239,7 +237,6 @@ static struct platform_device cmt_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu0",
|
||||
|
@ -248,7 +245,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -270,7 +266,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu0",
|
||||
|
@ -279,7 +274,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -301,7 +295,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu0",
|
||||
|
@ -309,7 +302,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -169,7 +169,6 @@ static struct platform_device veu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt_platform_data = {
|
||||
.name = "CMT",
|
||||
.channel_offset = 0x60,
|
||||
.timer_bit = 5,
|
||||
.clk = "cmt0",
|
||||
|
@ -179,7 +178,6 @@ static struct sh_timer_config cmt_platform_data = {
|
|||
|
||||
static struct resource cmt_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT",
|
||||
.start = 0x044a0060,
|
||||
.end = 0x044a006b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -201,7 +199,6 @@ static struct platform_device cmt_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu0",
|
||||
|
@ -210,7 +207,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -232,7 +228,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu0",
|
||||
|
@ -241,7 +236,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -263,7 +257,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu0",
|
||||
|
@ -271,7 +264,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -401,7 +401,6 @@ static struct platform_device jpu_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt_platform_data = {
|
||||
.name = "CMT",
|
||||
.channel_offset = 0x60,
|
||||
.timer_bit = 5,
|
||||
.clk = "cmt0",
|
||||
|
@ -411,7 +410,6 @@ static struct sh_timer_config cmt_platform_data = {
|
|||
|
||||
static struct resource cmt_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT",
|
||||
.start = 0x044a0060,
|
||||
.end = 0x044a006b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -436,7 +434,6 @@ static struct platform_device cmt_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu0",
|
||||
|
@ -445,7 +442,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -470,7 +466,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu0",
|
||||
|
@ -479,7 +474,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -504,7 +498,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu0",
|
||||
|
@ -512,7 +505,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -211,7 +211,6 @@ static struct platform_device veu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt_platform_data = {
|
||||
.name = "CMT",
|
||||
.channel_offset = 0x60,
|
||||
.timer_bit = 5,
|
||||
.clk = "cmt0",
|
||||
|
@ -221,7 +220,6 @@ static struct sh_timer_config cmt_platform_data = {
|
|||
|
||||
static struct resource cmt_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT",
|
||||
.start = 0x044a0060,
|
||||
.end = 0x044a006b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -246,7 +244,6 @@ static struct platform_device cmt_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu0",
|
||||
|
@ -255,7 +252,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -280,7 +276,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu0",
|
||||
|
@ -289,7 +284,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -314,7 +308,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu0",
|
||||
|
@ -322,7 +315,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -347,7 +339,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu1",
|
||||
|
@ -355,7 +346,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffd90008,
|
||||
.end = 0xffd90013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -380,7 +370,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu1",
|
||||
|
@ -388,7 +377,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffd90014,
|
||||
.end = 0xffd9001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -413,7 +401,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu1",
|
||||
|
@ -421,7 +408,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffd90020,
|
||||
.end = 0xffd9002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -485,7 +485,6 @@ static struct platform_device veu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config cmt_platform_data = {
|
||||
.name = "CMT",
|
||||
.channel_offset = 0x60,
|
||||
.timer_bit = 5,
|
||||
.clk = "cmt0",
|
||||
|
@ -495,7 +494,6 @@ static struct sh_timer_config cmt_platform_data = {
|
|||
|
||||
static struct resource cmt_resources[] = {
|
||||
[0] = {
|
||||
.name = "CMT",
|
||||
.start = 0x044a0060,
|
||||
.end = 0x044a006b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -520,7 +518,6 @@ static struct platform_device cmt_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu0",
|
||||
|
@ -529,7 +526,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -554,7 +550,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu0",
|
||||
|
@ -563,7 +558,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -588,7 +582,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu0",
|
||||
|
@ -596,7 +589,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -622,7 +614,6 @@ static struct platform_device tmu2_device = {
|
|||
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu1",
|
||||
|
@ -630,7 +621,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffd90008,
|
||||
.end = 0xffd90013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -655,7 +645,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu1",
|
||||
|
@ -663,7 +652,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffd90014,
|
||||
.end = 0xffd9001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -688,7 +676,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu1",
|
||||
|
@ -696,7 +683,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffd90020,
|
||||
.end = 0xffd9002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -63,7 +63,6 @@ static struct platform_device scif4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -72,7 +71,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xfe430008,
|
||||
.end = 0xfe430013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -94,7 +92,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -103,7 +100,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xfe430014,
|
||||
.end = 0xfe43001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -131,7 +131,6 @@ static struct platform_device usbf_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -140,7 +139,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -162,7 +160,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -171,7 +168,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -193,7 +189,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -201,7 +196,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -223,7 +217,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -231,7 +224,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffd88008,
|
||||
.end = 0xffd88013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -253,7 +245,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -261,7 +252,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffd88014,
|
||||
.end = 0xffd8801f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -283,7 +273,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -291,7 +280,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffd88020,
|
||||
.end = 0xffd8802b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -165,7 +165,6 @@ static struct platform_device scif9_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -174,7 +173,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -196,7 +194,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -205,7 +202,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -227,7 +223,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -235,7 +230,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -257,7 +251,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -265,7 +258,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffd81008,
|
||||
.end = 0xffd81013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -287,7 +279,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -295,7 +286,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffd81014,
|
||||
.end = 0xffd8101f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -317,7 +307,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -325,7 +314,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffd81020,
|
||||
.end = 0xffd8102f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -347,7 +335,6 @@ static struct platform_device tmu5_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu6_platform_data = {
|
||||
.name = "TMU6",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -355,7 +342,6 @@ static struct sh_timer_config tmu6_platform_data = {
|
|||
|
||||
static struct resource tmu6_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU6",
|
||||
.start = 0xffd82008,
|
||||
.end = 0xffd82013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -377,7 +363,6 @@ static struct platform_device tmu6_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu7_platform_data = {
|
||||
.name = "TMU7",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -385,7 +370,6 @@ static struct sh_timer_config tmu7_platform_data = {
|
|||
|
||||
static struct resource tmu7_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU7",
|
||||
.start = 0xffd82014,
|
||||
.end = 0xffd8201f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -407,7 +391,6 @@ static struct platform_device tmu7_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu8_platform_data = {
|
||||
.name = "TMU8",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -415,7 +398,6 @@ static struct sh_timer_config tmu8_platform_data = {
|
|||
|
||||
static struct resource tmu8_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU8",
|
||||
.start = 0xffd82020,
|
||||
.end = 0xffd8202b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -49,7 +49,6 @@ static struct platform_device scif1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -58,7 +57,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -80,7 +78,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -89,7 +86,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -111,7 +107,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -119,7 +114,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -141,7 +135,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -149,7 +142,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffdc0008,
|
||||
.end = 0xffdc0013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -171,7 +163,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -179,7 +170,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffdc0014,
|
||||
.end = 0xffdc001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -201,7 +191,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -209,7 +198,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffdc0020,
|
||||
.end = 0xffdc002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -117,7 +117,6 @@ static struct platform_device scif5_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu012_fck",
|
||||
|
@ -126,7 +125,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -148,7 +146,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu012_fck",
|
||||
|
@ -157,7 +154,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -179,7 +175,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu012_fck",
|
||||
|
@ -187,7 +182,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -209,7 +203,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "tmu345_fck",
|
||||
|
@ -217,7 +210,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffdc0008,
|
||||
.end = 0xffdc0013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -239,7 +231,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "tmu345_fck",
|
||||
|
@ -247,7 +238,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffdc0014,
|
||||
.end = 0xffdc001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -269,7 +259,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "tmu345_fck",
|
||||
|
@ -277,7 +266,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffdc0020,
|
||||
.end = 0xffdc002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -117,7 +117,6 @@ static struct platform_device scif5_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -126,7 +125,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffd80008,
|
||||
.end = 0xffd80013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -148,7 +146,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -157,7 +154,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffd80014,
|
||||
.end = 0xffd8001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -179,7 +175,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -187,7 +182,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffd80020,
|
||||
.end = 0xffd8002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -209,7 +203,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -217,7 +210,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffda0008,
|
||||
.end = 0xffda0013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -239,7 +231,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -247,7 +238,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffda0014,
|
||||
.end = 0xffda001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -269,7 +259,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -277,7 +266,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffda0020,
|
||||
.end = 0xffda002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -299,7 +287,6 @@ static struct platform_device tmu5_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu6_platform_data = {
|
||||
.name = "TMU6",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -307,7 +294,6 @@ static struct sh_timer_config tmu6_platform_data = {
|
|||
|
||||
static struct resource tmu6_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU6",
|
||||
.start = 0xffdc0008,
|
||||
.end = 0xffdc0013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -329,7 +315,6 @@ static struct platform_device tmu6_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu7_platform_data = {
|
||||
.name = "TMU7",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -337,7 +322,6 @@ static struct sh_timer_config tmu7_platform_data = {
|
|||
|
||||
static struct resource tmu7_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU7",
|
||||
.start = 0xffdc0014,
|
||||
.end = 0xffdc001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -359,7 +343,6 @@ static struct platform_device tmu7_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu8_platform_data = {
|
||||
.name = "TMU8",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -367,7 +350,6 @@ static struct sh_timer_config tmu8_platform_data = {
|
|||
|
||||
static struct resource tmu8_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU8",
|
||||
.start = 0xffdc0020,
|
||||
.end = 0xffdc002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -389,7 +371,6 @@ static struct platform_device tmu8_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu9_platform_data = {
|
||||
.name = "TMU9",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -397,7 +378,6 @@ static struct sh_timer_config tmu9_platform_data = {
|
|||
|
||||
static struct resource tmu9_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU9",
|
||||
.start = 0xffde0008,
|
||||
.end = 0xffde0013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -419,7 +399,6 @@ static struct platform_device tmu9_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu10_platform_data = {
|
||||
.name = "TMU10",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -427,7 +406,6 @@ static struct sh_timer_config tmu10_platform_data = {
|
|||
|
||||
static struct resource tmu10_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU10",
|
||||
.start = 0xffde0014,
|
||||
.end = 0xffde001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -449,7 +427,6 @@ static struct platform_device tmu10_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu11_platform_data = {
|
||||
.name = "TMU11",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -457,7 +434,6 @@ static struct sh_timer_config tmu11_platform_data = {
|
|||
|
||||
static struct resource tmu11_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU11",
|
||||
.start = 0xffde0020,
|
||||
.end = 0xffde002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -70,7 +70,6 @@ static struct platform_device scif2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -79,7 +78,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = 0xffc10008,
|
||||
.end = 0xffc10013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -101,7 +99,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -110,7 +107,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = 0xffc10014,
|
||||
.end = 0xffc1001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -132,7 +128,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -140,7 +135,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = 0xffc10020,
|
||||
.end = 0xffc1002f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -162,7 +156,6 @@ static struct platform_device tmu2_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu3_platform_data = {
|
||||
.name = "TMU3",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -170,7 +163,6 @@ static struct sh_timer_config tmu3_platform_data = {
|
|||
|
||||
static struct resource tmu3_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU3",
|
||||
.start = 0xffc20008,
|
||||
.end = 0xffc20013,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -192,7 +184,6 @@ static struct platform_device tmu3_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu4_platform_data = {
|
||||
.name = "TMU4",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -200,7 +191,6 @@ static struct sh_timer_config tmu4_platform_data = {
|
|||
|
||||
static struct resource tmu4_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU4",
|
||||
.start = 0xffc20014,
|
||||
.end = 0xffc2001f,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -222,7 +212,6 @@ static struct platform_device tmu4_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu5_platform_data = {
|
||||
.name = "TMU5",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -230,7 +219,6 @@ static struct sh_timer_config tmu5_platform_data = {
|
|||
|
||||
static struct resource tmu5_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU5",
|
||||
.start = 0xffc20020,
|
||||
.end = 0xffc2002b,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -68,7 +68,6 @@ static struct platform_device rtc_device = {
|
|||
#define TMU2_BASE (TMU_BASE + 0x8 + (0xc * 0x2))
|
||||
|
||||
static struct sh_timer_config tmu0_platform_data = {
|
||||
.name = "TMU0",
|
||||
.channel_offset = 0x04,
|
||||
.timer_bit = 0,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -77,7 +76,6 @@ static struct sh_timer_config tmu0_platform_data = {
|
|||
|
||||
static struct resource tmu0_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU0",
|
||||
.start = TMU0_BASE,
|
||||
.end = TMU0_BASE + 0xc - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -99,7 +97,6 @@ static struct platform_device tmu0_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu1_platform_data = {
|
||||
.name = "TMU1",
|
||||
.channel_offset = 0x10,
|
||||
.timer_bit = 1,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -108,7 +105,6 @@ static struct sh_timer_config tmu1_platform_data = {
|
|||
|
||||
static struct resource tmu1_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU1",
|
||||
.start = TMU1_BASE,
|
||||
.end = TMU1_BASE + 0xc - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
@ -130,7 +126,6 @@ static struct platform_device tmu1_device = {
|
|||
};
|
||||
|
||||
static struct sh_timer_config tmu2_platform_data = {
|
||||
.name = "TMU2",
|
||||
.channel_offset = 0x1c,
|
||||
.timer_bit = 2,
|
||||
.clk = "peripheral_clk",
|
||||
|
@ -138,7 +133,6 @@ static struct sh_timer_config tmu2_platform_data = {
|
|||
|
||||
static struct resource tmu2_resources[] = {
|
||||
[0] = {
|
||||
.name = "TMU2",
|
||||
.start = TMU2_BASE,
|
||||
.end = TMU2_BASE + 0xc - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
|
|
|
@ -903,7 +903,7 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops sysfs_ops = {
|
||||
static const struct sysfs_ops sysfs_ops = {
|
||||
.show = show,
|
||||
.store = store,
|
||||
};
|
||||
|
|
|
@ -2044,6 +2044,7 @@ static __init void mce_init_banks(void)
|
|||
struct mce_bank *b = &mce_banks[i];
|
||||
struct sysdev_attribute *a = &b->attr;
|
||||
|
||||
sysfs_attr_init(&a->attr);
|
||||
a->attr.name = b->attrname;
|
||||
snprintf(b->attrname, ATTR_LEN, "bank%d", i);
|
||||
|
||||
|
|
|
@ -388,7 +388,7 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops threshold_ops = {
|
||||
static const struct sysfs_ops threshold_ops = {
|
||||
.show = show,
|
||||
.store = store,
|
||||
};
|
||||
|
|
|
@ -278,7 +278,7 @@ static struct attribute *integrity_attrs[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static struct sysfs_ops integrity_ops = {
|
||||
static const struct sysfs_ops integrity_ops = {
|
||||
.show = &integrity_attr_show,
|
||||
.store = &integrity_attr_store,
|
||||
};
|
||||
|
|
|
@ -450,7 +450,7 @@ static void blk_release_queue(struct kobject *kobj)
|
|||
kmem_cache_free(blk_requestq_cachep, q);
|
||||
}
|
||||
|
||||
static struct sysfs_ops queue_sysfs_ops = {
|
||||
static const struct sysfs_ops queue_sysfs_ops = {
|
||||
.show = queue_attr_show,
|
||||
.store = queue_attr_store,
|
||||
};
|
||||
|
|
|
@ -892,7 +892,7 @@ elv_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
return error;
|
||||
}
|
||||
|
||||
static struct sysfs_ops elv_sysfs_ops = {
|
||||
static const struct sysfs_ops elv_sysfs_ops = {
|
||||
.show = elv_attr_show,
|
||||
.store = elv_attr_store,
|
||||
};
|
||||
|
|
|
@ -101,6 +101,7 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr,
|
|||
struct acpi_table_header *header = NULL;
|
||||
struct acpi_table_attr *attr = NULL;
|
||||
|
||||
sysfs_attr_init(&table_attr->attr.attr);
|
||||
if (table_header->signature[0] != '\0')
|
||||
memcpy(table_attr->name, table_header->signature,
|
||||
ACPI_NAME_SIZE);
|
||||
|
@ -475,6 +476,7 @@ void acpi_irq_stats_init(void)
|
|||
goto fail;
|
||||
strncpy(name, buffer, strlen(buffer) + 1);
|
||||
|
||||
sysfs_attr_init(&counter_attrs[i].attr);
|
||||
counter_attrs[i].attr.name = name;
|
||||
counter_attrs[i].attr.mode = 0644;
|
||||
counter_attrs[i].show = counter_show;
|
||||
|
|
|
@ -81,7 +81,7 @@ static struct fb_ops cfag12864bfb_ops = {
|
|||
.fb_mmap = cfag12864bfb_mmap,
|
||||
};
|
||||
|
||||
static int __init cfag12864bfb_probe(struct platform_device *device)
|
||||
static int __devinit cfag12864bfb_probe(struct platform_device *device)
|
||||
{
|
||||
int ret = -EINVAL;
|
||||
struct fb_info *info = framebuffer_alloc(0, &device->dev);
|
||||
|
|
|
@ -3,35 +3,50 @@ menu "Generic Driver Options"
|
|||
config UEVENT_HELPER_PATH
|
||||
string "path to uevent helper"
|
||||
depends on HOTPLUG
|
||||
default "/sbin/hotplug"
|
||||
default ""
|
||||
help
|
||||
Path to uevent helper program forked by the kernel for
|
||||
every uevent.
|
||||
Before the switch to the netlink-based uevent source, this was
|
||||
used to hook hotplug scripts into kernel device events. It
|
||||
usually pointed to a shell script at /sbin/hotplug.
|
||||
This should not be used today, because usual systems create
|
||||
many events at bootup or device discovery in a very short time
|
||||
frame. One forked process per event can create so many processes
|
||||
that it creates a high system load, or on smaller systems
|
||||
it is known to create out-of-memory situations during bootup.
|
||||
|
||||
config DEVTMPFS
|
||||
bool "Create a kernel maintained /dev tmpfs (EXPERIMENTAL)"
|
||||
bool "Maintain a devtmpfs filesystem to mount at /dev"
|
||||
depends on HOTPLUG && SHMEM && TMPFS
|
||||
help
|
||||
This creates a tmpfs filesystem, and mounts it at bootup
|
||||
and mounts it at /dev. The kernel driver core creates device
|
||||
nodes for all registered devices in that filesystem. All device
|
||||
nodes are owned by root and have the default mode of 0600.
|
||||
Userspace can add and delete the nodes as needed. This is
|
||||
intended to simplify bootup, and make it possible to delay
|
||||
the initial coldplug at bootup done by udev in userspace.
|
||||
It should also provide a simpler way for rescue systems
|
||||
to bring up a kernel with dynamic major/minor numbers.
|
||||
Meaningful symlinks, permissions and device ownership must
|
||||
still be handled by userspace.
|
||||
If unsure, say N here.
|
||||
This creates a tmpfs filesystem instance early at bootup.
|
||||
In this filesystem, the kernel driver core maintains device
|
||||
nodes with their default names and permissions for all
|
||||
registered devices with an assigned major/minor number.
|
||||
Userspace can modify the filesystem content as needed, add
|
||||
symlinks, and apply needed permissions.
|
||||
It provides a fully functional /dev directory, where usually
|
||||
udev runs on top, managing permissions and adding meaningful
|
||||
symlinks.
|
||||
In very limited environments, it may provide a sufficient
|
||||
functional /dev without any further help. It also allows simple
|
||||
rescue systems, and reliably handles dynamic major/minor numbers.
|
||||
|
||||
config DEVTMPFS_MOUNT
|
||||
bool "Automount devtmpfs at /dev"
|
||||
bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
|
||||
depends on DEVTMPFS
|
||||
help
|
||||
This will mount devtmpfs at /dev if the kernel mounts the root
|
||||
filesystem. It will not affect initramfs based mounting.
|
||||
If unsure, say N here.
|
||||
This will instruct the kernel to automatically mount the
|
||||
devtmpfs filesystem at /dev, directly after the kernel has
|
||||
mounted the root filesystem. The behavior can be overridden
|
||||
with the commandline parameter: devtmpfs.mount=0|1.
|
||||
This option does not affect initramfs based booting, here
|
||||
the devtmpfs filesystem always needs to be mounted manually
|
||||
after the roots is mounted.
|
||||
With this option enabled, it allows to bring up a system in
|
||||
rescue mode with init=/bin/sh, even when the /dev directory
|
||||
on the rootfs is completely empty.
|
||||
|
||||
config STANDALONE
|
||||
bool "Select only drivers that don't need compile-time external firmware" if EXPERIMENTAL
|
||||
|
|
|
@ -70,7 +70,7 @@ static ssize_t drv_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops driver_sysfs_ops = {
|
||||
static const struct sysfs_ops driver_sysfs_ops = {
|
||||
.show = drv_attr_show,
|
||||
.store = drv_attr_store,
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops bus_sysfs_ops = {
|
||||
static const struct sysfs_ops bus_sysfs_ops = {
|
||||
.show = bus_attr_show,
|
||||
.store = bus_attr_store,
|
||||
};
|
||||
|
@ -154,7 +154,7 @@ static int bus_uevent_filter(struct kset *kset, struct kobject *kobj)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct kset_uevent_ops bus_uevent_ops = {
|
||||
static const struct kset_uevent_ops bus_uevent_ops = {
|
||||
.filter = bus_uevent_filter,
|
||||
};
|
||||
|
||||
|
@ -173,10 +173,10 @@ static ssize_t driver_unbind(struct device_driver *drv,
|
|||
dev = bus_find_device_by_name(bus, NULL, buf);
|
||||
if (dev && dev->driver == drv) {
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
device_lock(dev->parent);
|
||||
device_release_driver(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
err = count;
|
||||
}
|
||||
put_device(dev);
|
||||
|
@ -200,12 +200,12 @@ static ssize_t driver_bind(struct device_driver *drv,
|
|||
dev = bus_find_device_by_name(bus, NULL, buf);
|
||||
if (dev && dev->driver == NULL && driver_match_device(drv, dev)) {
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
down(&dev->sem);
|
||||
device_lock(dev->parent);
|
||||
device_lock(dev);
|
||||
err = driver_probe_device(drv, dev);
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
|
||||
if (err > 0) {
|
||||
/* success */
|
||||
|
@ -744,10 +744,10 @@ static int __must_check bus_rescan_devices_helper(struct device *dev,
|
|||
|
||||
if (!dev->driver) {
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
device_lock(dev->parent);
|
||||
ret = device_attach(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
}
|
||||
return ret < 0 ? ret : 0;
|
||||
}
|
||||
|
@ -779,10 +779,10 @@ int device_reprobe(struct device *dev)
|
|||
{
|
||||
if (dev->driver) {
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
device_lock(dev->parent);
|
||||
device_release_driver(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
}
|
||||
return bus_rescan_devices_helper(dev, NULL);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ static ssize_t class_attr_show(struct kobject *kobj, struct attribute *attr,
|
|||
ssize_t ret = -EIO;
|
||||
|
||||
if (class_attr->show)
|
||||
ret = class_attr->show(cp->class, buf);
|
||||
ret = class_attr->show(cp->class, class_attr, buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ static ssize_t class_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
ssize_t ret = -EIO;
|
||||
|
||||
if (class_attr->store)
|
||||
ret = class_attr->store(cp->class, buf, count);
|
||||
ret = class_attr->store(cp->class, class_attr, buf, count);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ static void class_release(struct kobject *kobj)
|
|||
kfree(cp);
|
||||
}
|
||||
|
||||
static struct sysfs_ops class_sysfs_ops = {
|
||||
static const struct sysfs_ops class_sysfs_ops = {
|
||||
.show = class_attr_show,
|
||||
.store = class_attr_store,
|
||||
};
|
||||
|
@ -490,6 +490,16 @@ void class_interface_unregister(struct class_interface *class_intf)
|
|||
class_put(parent);
|
||||
}
|
||||
|
||||
ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct class_attribute_string *cs;
|
||||
cs = container_of(attr, struct class_attribute_string, attr);
|
||||
return snprintf(buf, PAGE_SIZE, "%s\n", cs->str);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(show_class_attr_string);
|
||||
|
||||
struct class_compat {
|
||||
struct kobject *kobj;
|
||||
};
|
||||
|
|
|
@ -100,7 +100,7 @@ static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops dev_sysfs_ops = {
|
||||
static const struct sysfs_ops dev_sysfs_ops = {
|
||||
.show = dev_attr_show,
|
||||
.store = dev_attr_store,
|
||||
};
|
||||
|
@ -252,7 +252,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static struct kset_uevent_ops device_uevent_ops = {
|
||||
static const struct kset_uevent_ops device_uevent_ops = {
|
||||
.filter = dev_uevent_filter,
|
||||
.name = dev_uevent_name,
|
||||
.uevent = dev_uevent,
|
||||
|
@ -306,15 +306,10 @@ static ssize_t store_uevent(struct device *dev, struct device_attribute *attr,
|
|||
{
|
||||
enum kobject_action action;
|
||||
|
||||
if (kobject_action_type(buf, count, &action) == 0) {
|
||||
if (kobject_action_type(buf, count, &action) == 0)
|
||||
kobject_uevent(&dev->kobj, action);
|
||||
goto out;
|
||||
}
|
||||
|
||||
dev_err(dev, "uevent: unsupported action-string; this will "
|
||||
"be ignored in a future kernel version\n");
|
||||
kobject_uevent(&dev->kobj, KOBJ_ADD);
|
||||
out:
|
||||
else
|
||||
dev_err(dev, "uevent: unknown action-string\n");
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -607,6 +602,7 @@ static struct kobject *get_device_parent(struct device *dev,
|
|||
int retval;
|
||||
|
||||
if (dev->class) {
|
||||
static DEFINE_MUTEX(gdp_mutex);
|
||||
struct kobject *kobj = NULL;
|
||||
struct kobject *parent_kobj;
|
||||
struct kobject *k;
|
||||
|
@ -623,6 +619,8 @@ static struct kobject *get_device_parent(struct device *dev,
|
|||
else
|
||||
parent_kobj = &parent->kobj;
|
||||
|
||||
mutex_lock(&gdp_mutex);
|
||||
|
||||
/* find our class-directory at the parent and reference it */
|
||||
spin_lock(&dev->class->p->class_dirs.list_lock);
|
||||
list_for_each_entry(k, &dev->class->p->class_dirs.list, entry)
|
||||
|
@ -631,20 +629,26 @@ static struct kobject *get_device_parent(struct device *dev,
|
|||
break;
|
||||
}
|
||||
spin_unlock(&dev->class->p->class_dirs.list_lock);
|
||||
if (kobj)
|
||||
if (kobj) {
|
||||
mutex_unlock(&gdp_mutex);
|
||||
return kobj;
|
||||
}
|
||||
|
||||
/* or create a new class-directory at the parent device */
|
||||
k = kobject_create();
|
||||
if (!k)
|
||||
if (!k) {
|
||||
mutex_unlock(&gdp_mutex);
|
||||
return NULL;
|
||||
}
|
||||
k->kset = &dev->class->p->class_dirs;
|
||||
retval = kobject_add(k, parent_kobj, "%s", dev->class->name);
|
||||
if (retval < 0) {
|
||||
mutex_unlock(&gdp_mutex);
|
||||
kobject_put(k);
|
||||
return NULL;
|
||||
}
|
||||
/* do not emit an uevent for this simple "glue" directory */
|
||||
mutex_unlock(&gdp_mutex);
|
||||
return k;
|
||||
}
|
||||
|
||||
|
@ -1574,22 +1578,16 @@ int device_rename(struct device *dev, char *new_name)
|
|||
if (old_class_name) {
|
||||
new_class_name = make_class_name(dev->class->name, &dev->kobj);
|
||||
if (new_class_name) {
|
||||
error = sysfs_create_link_nowarn(&dev->parent->kobj,
|
||||
&dev->kobj,
|
||||
new_class_name);
|
||||
if (error)
|
||||
goto out;
|
||||
sysfs_remove_link(&dev->parent->kobj, old_class_name);
|
||||
error = sysfs_rename_link(&dev->parent->kobj,
|
||||
&dev->kobj,
|
||||
old_class_name,
|
||||
new_class_name);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (dev->class) {
|
||||
error = sysfs_create_link_nowarn(&dev->class->p->class_subsys.kobj,
|
||||
&dev->kobj, dev_name(dev));
|
||||
if (error)
|
||||
goto out;
|
||||
sysfs_remove_link(&dev->class->p->class_subsys.kobj,
|
||||
old_device_name);
|
||||
error = sysfs_rename_link(&dev->class->p->class_subsys.kobj,
|
||||
&dev->kobj, old_device_name, new_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,8 +13,11 @@
|
|||
|
||||
#include "base.h"
|
||||
|
||||
static struct sysdev_class_attribute *cpu_sysdev_class_attrs[];
|
||||
|
||||
struct sysdev_class cpu_sysdev_class = {
|
||||
.name = "cpu",
|
||||
.attrs = cpu_sysdev_class_attrs,
|
||||
};
|
||||
EXPORT_SYMBOL(cpu_sysdev_class);
|
||||
|
||||
|
@ -76,34 +79,24 @@ void unregister_cpu(struct cpu *cpu)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
|
||||
static ssize_t cpu_probe_store(struct class *class, const char *buf,
|
||||
static ssize_t cpu_probe_store(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
return arch_cpu_probe(buf, count);
|
||||
}
|
||||
|
||||
static ssize_t cpu_release_store(struct class *class, const char *buf,
|
||||
static ssize_t cpu_release_store(struct sys_device *dev,
|
||||
struct sysdev_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
return arch_cpu_release(buf, count);
|
||||
}
|
||||
|
||||
static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
|
||||
static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store);
|
||||
|
||||
int __init cpu_probe_release_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = sysfs_create_file(&cpu_sysdev_class.kset.kobj,
|
||||
&class_attr_probe.attr);
|
||||
if (!rc)
|
||||
rc = sysfs_create_file(&cpu_sysdev_class.kset.kobj,
|
||||
&class_attr_release.attr);
|
||||
|
||||
return rc;
|
||||
}
|
||||
device_initcall(cpu_probe_release_init);
|
||||
static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store);
|
||||
static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store);
|
||||
#endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */
|
||||
|
||||
#else /* ... !CONFIG_HOTPLUG_CPU */
|
||||
|
@ -141,31 +134,39 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL);
|
|||
/*
|
||||
* Print cpu online, possible, present, and system maps
|
||||
*/
|
||||
static ssize_t print_cpus_map(char *buf, const struct cpumask *map)
|
||||
|
||||
struct cpu_attr {
|
||||
struct sysdev_class_attribute attr;
|
||||
const struct cpumask *const * const map;
|
||||
};
|
||||
|
||||
static ssize_t show_cpus_attr(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
int n = cpulist_scnprintf(buf, PAGE_SIZE-2, map);
|
||||
struct cpu_attr *ca = container_of(attr, struct cpu_attr, attr);
|
||||
int n = cpulist_scnprintf(buf, PAGE_SIZE-2, *(ca->map));
|
||||
|
||||
buf[n++] = '\n';
|
||||
buf[n] = '\0';
|
||||
return n;
|
||||
}
|
||||
|
||||
#define print_cpus_func(type) \
|
||||
static ssize_t print_cpus_##type(struct sysdev_class *class, char *buf) \
|
||||
{ \
|
||||
return print_cpus_map(buf, cpu_##type##_mask); \
|
||||
} \
|
||||
static struct sysdev_class_attribute attr_##type##_map = \
|
||||
_SYSDEV_CLASS_ATTR(type, 0444, print_cpus_##type, NULL)
|
||||
#define _CPU_ATTR(name, map) \
|
||||
{ _SYSDEV_CLASS_ATTR(name, 0444, show_cpus_attr, NULL), map }
|
||||
|
||||
print_cpus_func(online);
|
||||
print_cpus_func(possible);
|
||||
print_cpus_func(present);
|
||||
/* Keep in sync with cpu_sysdev_class_attrs */
|
||||
static struct cpu_attr cpu_attrs[] = {
|
||||
_CPU_ATTR(online, &cpu_online_mask),
|
||||
_CPU_ATTR(possible, &cpu_possible_mask),
|
||||
_CPU_ATTR(present, &cpu_present_mask),
|
||||
};
|
||||
|
||||
/*
|
||||
* Print values for NR_CPUS and offlined cpus
|
||||
*/
|
||||
static ssize_t print_cpus_kernel_max(struct sysdev_class *class, char *buf)
|
||||
static ssize_t print_cpus_kernel_max(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr, char *buf)
|
||||
{
|
||||
int n = snprintf(buf, PAGE_SIZE-2, "%d\n", NR_CPUS - 1);
|
||||
return n;
|
||||
|
@ -175,7 +176,8 @@ static SYSDEV_CLASS_ATTR(kernel_max, 0444, print_cpus_kernel_max, NULL);
|
|||
/* arch-optional setting to enable display of offline cpus >= nr_cpu_ids */
|
||||
unsigned int total_cpus;
|
||||
|
||||
static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf)
|
||||
static ssize_t print_cpus_offline(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr, char *buf)
|
||||
{
|
||||
int n = 0, len = PAGE_SIZE-2;
|
||||
cpumask_var_t offline;
|
||||
|
@ -204,29 +206,6 @@ static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf)
|
|||
}
|
||||
static SYSDEV_CLASS_ATTR(offline, 0444, print_cpus_offline, NULL);
|
||||
|
||||
static struct sysdev_class_attribute *cpu_state_attr[] = {
|
||||
&attr_online_map,
|
||||
&attr_possible_map,
|
||||
&attr_present_map,
|
||||
&attr_kernel_max,
|
||||
&attr_offline,
|
||||
};
|
||||
|
||||
static int cpu_states_init(void)
|
||||
{
|
||||
int i;
|
||||
int err = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cpu_state_attr); i++) {
|
||||
int ret;
|
||||
ret = sysdev_class_create_file(&cpu_sysdev_class,
|
||||
cpu_state_attr[i]);
|
||||
if (!err)
|
||||
err = ret;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
* register_cpu - Setup a sysfs device for a CPU.
|
||||
* @cpu - cpu->hotpluggable field set to 1 will generate a control file in
|
||||
|
@ -272,9 +251,6 @@ int __init cpu_dev_init(void)
|
|||
int err;
|
||||
|
||||
err = sysdev_class_register(&cpu_sysdev_class);
|
||||
if (!err)
|
||||
err = cpu_states_init();
|
||||
|
||||
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
|
||||
if (!err)
|
||||
err = sched_create_sysfs_power_savings_entries(&cpu_sysdev_class);
|
||||
|
@ -282,3 +258,16 @@ int __init cpu_dev_init(void)
|
|||
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = {
|
||||
#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
|
||||
&attr_probe,
|
||||
&attr_release,
|
||||
#endif
|
||||
&cpu_attrs[0].attr,
|
||||
&cpu_attrs[1].attr,
|
||||
&cpu_attrs[2].attr,
|
||||
&attr_kernel_max,
|
||||
&attr_offline,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -85,7 +85,7 @@ static void driver_sysfs_remove(struct device *dev)
|
|||
* for before calling this. (It is ok to call with no other effort
|
||||
* from a driver's probe() method.)
|
||||
*
|
||||
* This function must be called with @dev->sem held.
|
||||
* This function must be called with the device lock held.
|
||||
*/
|
||||
int device_bind_driver(struct device *dev)
|
||||
{
|
||||
|
@ -190,8 +190,8 @@ EXPORT_SYMBOL_GPL(wait_for_device_probe);
|
|||
* This function returns -ENODEV if the device is not registered,
|
||||
* 1 if the device is bound successfully and 0 otherwise.
|
||||
*
|
||||
* This function must be called with @dev->sem held. When called for a
|
||||
* USB interface, @dev->parent->sem must be held as well.
|
||||
* This function must be called with @dev lock held. When called for a
|
||||
* USB interface, @dev->parent lock must be held as well.
|
||||
*/
|
||||
int driver_probe_device(struct device_driver *drv, struct device *dev)
|
||||
{
|
||||
|
@ -233,13 +233,13 @@ static int __device_attach(struct device_driver *drv, void *data)
|
|||
* 0 if no matching driver was found;
|
||||
* -ENODEV if the device is not registered.
|
||||
*
|
||||
* When called for a USB interface, @dev->parent->sem must be held.
|
||||
* When called for a USB interface, @dev->parent lock must be held.
|
||||
*/
|
||||
int device_attach(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
if (dev->driver) {
|
||||
ret = device_bind_driver(dev);
|
||||
if (ret == 0)
|
||||
|
@ -253,7 +253,7 @@ int device_attach(struct device *dev)
|
|||
ret = bus_for_each_drv(dev->bus, NULL, dev, __device_attach);
|
||||
pm_runtime_put_sync(dev);
|
||||
}
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(device_attach);
|
||||
|
@ -276,13 +276,13 @@ static int __driver_attach(struct device *dev, void *data)
|
|||
return 0;
|
||||
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
down(&dev->sem);
|
||||
device_lock(dev->parent);
|
||||
device_lock(dev);
|
||||
if (!dev->driver)
|
||||
driver_probe_device(drv, dev);
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -303,8 +303,8 @@ int driver_attach(struct device_driver *drv)
|
|||
EXPORT_SYMBOL_GPL(driver_attach);
|
||||
|
||||
/*
|
||||
* __device_release_driver() must be called with @dev->sem held.
|
||||
* When called for a USB interface, @dev->parent->sem must be held as well.
|
||||
* __device_release_driver() must be called with @dev lock held.
|
||||
* When called for a USB interface, @dev->parent lock must be held as well.
|
||||
*/
|
||||
static void __device_release_driver(struct device *dev)
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ static void __device_release_driver(struct device *dev)
|
|||
* @dev: device.
|
||||
*
|
||||
* Manually detach device from driver.
|
||||
* When called for a USB interface, @dev->parent->sem must be held.
|
||||
* When called for a USB interface, @dev->parent lock must be held.
|
||||
*/
|
||||
void device_release_driver(struct device *dev)
|
||||
{
|
||||
|
@ -352,9 +352,9 @@ void device_release_driver(struct device *dev)
|
|||
* within their ->remove callback for the same device, they
|
||||
* will deadlock right here.
|
||||
*/
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
__device_release_driver(dev);
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(device_release_driver);
|
||||
|
||||
|
@ -381,13 +381,13 @@ void driver_detach(struct device_driver *drv)
|
|||
spin_unlock(&drv->p->klist_devices.k_lock);
|
||||
|
||||
if (dev->parent) /* Needed for USB */
|
||||
down(&dev->parent->sem);
|
||||
down(&dev->sem);
|
||||
device_lock(dev->parent);
|
||||
device_lock(dev);
|
||||
if (dev->driver == drv)
|
||||
__device_release_driver(dev);
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
if (dev->parent)
|
||||
up(&dev->parent->sem);
|
||||
device_unlock(dev->parent);
|
||||
put_device(dev);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -301,6 +301,19 @@ int devtmpfs_delete_node(struct device *dev)
|
|||
if (dentry->d_inode) {
|
||||
err = vfs_getattr(nd.path.mnt, dentry, &stat);
|
||||
if (!err && dev_mynode(dev, dentry->d_inode, &stat)) {
|
||||
struct iattr newattrs;
|
||||
/*
|
||||
* before unlinking this node, reset permissions
|
||||
* of possible references like hardlinks
|
||||
*/
|
||||
newattrs.ia_uid = 0;
|
||||
newattrs.ia_gid = 0;
|
||||
newattrs.ia_mode = stat.mode & ~0777;
|
||||
newattrs.ia_valid =
|
||||
ATTR_UID|ATTR_GID|ATTR_MODE;
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
notify_change(dentry, &newattrs);
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
err = vfs_unlink(nd.path.dentry->d_inode,
|
||||
dentry);
|
||||
if (!err || err == -ENOENT)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <linux/kthread.h>
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/firmware.h>
|
||||
#include "base.h"
|
||||
|
||||
#define to_dev(obj) container_of(obj, struct device, kobj)
|
||||
|
||||
|
@ -69,7 +68,9 @@ fw_load_abort(struct firmware_priv *fw_priv)
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
firmware_timeout_show(struct class *class, char *buf)
|
||||
firmware_timeout_show(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", loading_timeout);
|
||||
}
|
||||
|
@ -87,7 +88,9 @@ firmware_timeout_show(struct class *class, char *buf)
|
|||
* Note: zero means 'wait forever'.
|
||||
**/
|
||||
static ssize_t
|
||||
firmware_timeout_store(struct class *class, const char *buf, size_t count)
|
||||
firmware_timeout_store(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
loading_timeout = simple_strtol(buf, NULL, 10);
|
||||
if (loading_timeout < 0)
|
||||
|
@ -610,7 +613,7 @@ request_firmware_work_func(void *arg)
|
|||
}
|
||||
|
||||
/**
|
||||
* request_firmware_nowait: asynchronous version of request_firmware
|
||||
* request_firmware_nowait - asynchronous version of request_firmware
|
||||
* @module: module requesting the firmware
|
||||
* @uevent: sends uevent to copy the firmware image if this flag
|
||||
* is non-zero else the firmware copy must be done manually.
|
||||
|
|
|
@ -44,7 +44,7 @@ static int memory_uevent(struct kset *kset, struct kobject *obj, struct kobj_uev
|
|||
return retval;
|
||||
}
|
||||
|
||||
static struct kset_uevent_ops memory_uevent_ops = {
|
||||
static const struct kset_uevent_ops memory_uevent_ops = {
|
||||
.name = memory_uevent_name,
|
||||
.uevent = memory_uevent,
|
||||
};
|
||||
|
@ -309,17 +309,18 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL);
|
|||
* Block size attribute stuff
|
||||
*/
|
||||
static ssize_t
|
||||
print_block_size(struct class *class, char *buf)
|
||||
print_block_size(struct sysdev_class *class, struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE);
|
||||
}
|
||||
|
||||
static CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL);
|
||||
static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL);
|
||||
|
||||
static int block_size_init(void)
|
||||
{
|
||||
return sysfs_create_file(&memory_sysdev_class.kset.kobj,
|
||||
&class_attr_block_size_bytes.attr);
|
||||
&attr_block_size_bytes.attr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -330,7 +331,8 @@ static int block_size_init(void)
|
|||
*/
|
||||
#ifdef CONFIG_ARCH_MEMORY_PROBE
|
||||
static ssize_t
|
||||
memory_probe_store(struct class *class, const char *buf, size_t count)
|
||||
memory_probe_store(struct class *class, struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
u64 phys_addr;
|
||||
int nid;
|
||||
|
@ -367,7 +369,9 @@ static inline int memory_probe_init(void)
|
|||
|
||||
/* Soft offline a page */
|
||||
static ssize_t
|
||||
store_soft_offline_page(struct class *class, const char *buf, size_t count)
|
||||
store_soft_offline_page(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int ret;
|
||||
u64 pfn;
|
||||
|
@ -384,7 +388,9 @@ store_soft_offline_page(struct class *class, const char *buf, size_t count)
|
|||
|
||||
/* Forcibly offline a page, including killing processes. */
|
||||
static ssize_t
|
||||
store_hard_offline_page(struct class *class, const char *buf, size_t count)
|
||||
store_hard_offline_page(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
int ret;
|
||||
u64 pfn;
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/swap.h>
|
||||
|
||||
static struct sysdev_class_attribute *node_state_attrs[];
|
||||
|
||||
static struct sysdev_class node_class = {
|
||||
.name = "node",
|
||||
.attrs = node_state_attrs,
|
||||
};
|
||||
|
||||
|
||||
|
@ -544,76 +547,52 @@ static ssize_t print_nodes_state(enum node_states state, char *buf)
|
|||
return n;
|
||||
}
|
||||
|
||||
static ssize_t print_nodes_possible(struct sysdev_class *class, char *buf)
|
||||
{
|
||||
return print_nodes_state(N_POSSIBLE, buf);
|
||||
}
|
||||
|
||||
static ssize_t print_nodes_online(struct sysdev_class *class, char *buf)
|
||||
{
|
||||
return print_nodes_state(N_ONLINE, buf);
|
||||
}
|
||||
|
||||
static ssize_t print_nodes_has_normal_memory(struct sysdev_class *class,
|
||||
char *buf)
|
||||
{
|
||||
return print_nodes_state(N_NORMAL_MEMORY, buf);
|
||||
}
|
||||
|
||||
static ssize_t print_nodes_has_cpu(struct sysdev_class *class, char *buf)
|
||||
{
|
||||
return print_nodes_state(N_CPU, buf);
|
||||
}
|
||||
|
||||
static SYSDEV_CLASS_ATTR(possible, 0444, print_nodes_possible, NULL);
|
||||
static SYSDEV_CLASS_ATTR(online, 0444, print_nodes_online, NULL);
|
||||
static SYSDEV_CLASS_ATTR(has_normal_memory, 0444, print_nodes_has_normal_memory,
|
||||
NULL);
|
||||
static SYSDEV_CLASS_ATTR(has_cpu, 0444, print_nodes_has_cpu, NULL);
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
static ssize_t print_nodes_has_high_memory(struct sysdev_class *class,
|
||||
char *buf)
|
||||
{
|
||||
return print_nodes_state(N_HIGH_MEMORY, buf);
|
||||
}
|
||||
|
||||
static SYSDEV_CLASS_ATTR(has_high_memory, 0444, print_nodes_has_high_memory,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
struct sysdev_class_attribute *node_state_attr[] = {
|
||||
&attr_possible,
|
||||
&attr_online,
|
||||
&attr_has_normal_memory,
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
&attr_has_high_memory,
|
||||
#endif
|
||||
&attr_has_cpu,
|
||||
struct node_attr {
|
||||
struct sysdev_class_attribute attr;
|
||||
enum node_states state;
|
||||
};
|
||||
|
||||
static int node_states_init(void)
|
||||
static ssize_t show_node_state(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr, char *buf)
|
||||
{
|
||||
int i;
|
||||
int err = 0;
|
||||
|
||||
for (i = 0; i < NR_NODE_STATES; i++) {
|
||||
int ret;
|
||||
ret = sysdev_class_create_file(&node_class, node_state_attr[i]);
|
||||
if (!err)
|
||||
err = ret;
|
||||
}
|
||||
return err;
|
||||
struct node_attr *na = container_of(attr, struct node_attr, attr);
|
||||
return print_nodes_state(na->state, buf);
|
||||
}
|
||||
|
||||
#define _NODE_ATTR(name, state) \
|
||||
{ _SYSDEV_CLASS_ATTR(name, 0444, show_node_state, NULL), state }
|
||||
|
||||
static struct node_attr node_state_attr[] = {
|
||||
_NODE_ATTR(possible, N_POSSIBLE),
|
||||
_NODE_ATTR(online, N_ONLINE),
|
||||
_NODE_ATTR(has_normal_memory, N_NORMAL_MEMORY),
|
||||
_NODE_ATTR(has_cpu, N_CPU),
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
_NODE_ATTR(has_high_memory, N_HIGH_MEMORY),
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct sysdev_class_attribute *node_state_attrs[] = {
|
||||
&node_state_attr[0].attr,
|
||||
&node_state_attr[1].attr,
|
||||
&node_state_attr[2].attr,
|
||||
&node_state_attr[3].attr,
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
&node_state_attr[4].attr,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
#define NODE_CALLBACK_PRI 2 /* lower than SLAB */
|
||||
static int __init register_node_type(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(node_state_attr) != NR_NODE_STATES);
|
||||
BUILD_BUG_ON(ARRAY_SIZE(node_state_attrs)-1 != NR_NODE_STATES);
|
||||
|
||||
ret = sysdev_class_register(&node_class);
|
||||
if (!ret) {
|
||||
ret = node_states_init();
|
||||
hotplug_memory_notifier(node_memory_callback,
|
||||
NODE_CALLBACK_PRI);
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ struct platform_object {
|
|||
};
|
||||
|
||||
/**
|
||||
* platform_device_put
|
||||
* platform_device_put - destroy a platform device
|
||||
* @pdev: platform device to free
|
||||
*
|
||||
* Free all memory associated with a platform device. This function must
|
||||
|
@ -152,7 +152,7 @@ static void platform_device_release(struct device *dev)
|
|||
}
|
||||
|
||||
/**
|
||||
* platform_device_alloc
|
||||
* platform_device_alloc - create a platform device
|
||||
* @name: base name of the device we're adding
|
||||
* @id: instance id
|
||||
*
|
||||
|
@ -177,7 +177,7 @@ struct platform_device *platform_device_alloc(const char *name, int id)
|
|||
EXPORT_SYMBOL_GPL(platform_device_alloc);
|
||||
|
||||
/**
|
||||
* platform_device_add_resources
|
||||
* platform_device_add_resources - add resources to a platform device
|
||||
* @pdev: platform device allocated by platform_device_alloc to add resources to
|
||||
* @res: set of resources that needs to be allocated for the device
|
||||
* @num: number of resources
|
||||
|
@ -202,7 +202,7 @@ int platform_device_add_resources(struct platform_device *pdev,
|
|||
EXPORT_SYMBOL_GPL(platform_device_add_resources);
|
||||
|
||||
/**
|
||||
* platform_device_add_data
|
||||
* platform_device_add_data - add platform-specific data to a platform device
|
||||
* @pdev: platform device allocated by platform_device_alloc to add resources to
|
||||
* @data: platform specific data for this platform device
|
||||
* @size: size of platform specific data
|
||||
|
@ -344,7 +344,7 @@ void platform_device_unregister(struct platform_device *pdev)
|
|||
EXPORT_SYMBOL_GPL(platform_device_unregister);
|
||||
|
||||
/**
|
||||
* platform_device_register_simple
|
||||
* platform_device_register_simple - add a platform-level device and its resources
|
||||
* @name: base name of the device we're adding
|
||||
* @id: instance id
|
||||
* @res: set of resources that needs to be allocated for the device
|
||||
|
@ -396,7 +396,7 @@ struct platform_device *platform_device_register_simple(const char *name,
|
|||
EXPORT_SYMBOL_GPL(platform_device_register_simple);
|
||||
|
||||
/**
|
||||
* platform_device_register_data
|
||||
* platform_device_register_data - add a platform-level device with platform-specific data
|
||||
* @parent: parent device for the device we're adding
|
||||
* @name: base name of the device we're adding
|
||||
* @id: instance id
|
||||
|
@ -473,7 +473,7 @@ static void platform_drv_shutdown(struct device *_dev)
|
|||
}
|
||||
|
||||
/**
|
||||
* platform_driver_register
|
||||
* platform_driver_register - register a driver for platform-level devices
|
||||
* @drv: platform driver structure
|
||||
*/
|
||||
int platform_driver_register(struct platform_driver *drv)
|
||||
|
@ -491,7 +491,7 @@ int platform_driver_register(struct platform_driver *drv)
|
|||
EXPORT_SYMBOL_GPL(platform_driver_register);
|
||||
|
||||
/**
|
||||
* platform_driver_unregister
|
||||
* platform_driver_unregister - unregister a driver for platform-level devices
|
||||
* @drv: platform driver structure
|
||||
*/
|
||||
void platform_driver_unregister(struct platform_driver *drv)
|
||||
|
@ -548,6 +548,64 @@ int __init_or_module platform_driver_probe(struct platform_driver *drv,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(platform_driver_probe);
|
||||
|
||||
/**
|
||||
* platform_create_bundle - register driver and create corresponding device
|
||||
* @driver: platform driver structure
|
||||
* @probe: the driver probe routine, probably from an __init section
|
||||
* @res: set of resources that needs to be allocated for the device
|
||||
* @n_res: number of resources
|
||||
* @data: platform specific data for this platform device
|
||||
* @size: size of platform specific data
|
||||
*
|
||||
* Use this in legacy-style modules that probe hardware directly and
|
||||
* register a single platform device and corresponding platform driver.
|
||||
*/
|
||||
struct platform_device * __init_or_module platform_create_bundle(
|
||||
struct platform_driver *driver,
|
||||
int (*probe)(struct platform_device *),
|
||||
struct resource *res, unsigned int n_res,
|
||||
const void *data, size_t size)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
int error;
|
||||
|
||||
pdev = platform_device_alloc(driver->driver.name, -1);
|
||||
if (!pdev) {
|
||||
error = -ENOMEM;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
if (res) {
|
||||
error = platform_device_add_resources(pdev, res, n_res);
|
||||
if (error)
|
||||
goto err_pdev_put;
|
||||
}
|
||||
|
||||
if (data) {
|
||||
error = platform_device_add_data(pdev, data, size);
|
||||
if (error)
|
||||
goto err_pdev_put;
|
||||
}
|
||||
|
||||
error = platform_device_add(pdev);
|
||||
if (error)
|
||||
goto err_pdev_put;
|
||||
|
||||
error = platform_driver_probe(driver, probe);
|
||||
if (error)
|
||||
goto err_pdev_del;
|
||||
|
||||
return pdev;
|
||||
|
||||
err_pdev_del:
|
||||
platform_device_del(pdev);
|
||||
err_pdev_put:
|
||||
platform_device_put(pdev);
|
||||
err_out:
|
||||
return ERR_PTR(error);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(platform_create_bundle);
|
||||
|
||||
/* modalias support enables more hands-off userspace setup:
|
||||
* (a) environment variable lets new-style hotplug events work once system is
|
||||
* fully running: "modprobe $MODALIAS"
|
||||
|
@ -578,7 +636,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||
}
|
||||
|
||||
static const struct platform_device_id *platform_match_id(
|
||||
struct platform_device_id *id,
|
||||
const struct platform_device_id *id,
|
||||
struct platform_device *pdev)
|
||||
{
|
||||
while (id->name[0]) {
|
||||
|
@ -1181,6 +1239,25 @@ static int __init early_platform_driver_probe_id(char *class_str,
|
|||
}
|
||||
|
||||
if (match) {
|
||||
/*
|
||||
* Set up a sensible init_name to enable
|
||||
* dev_name() and others to be used before the
|
||||
* rest of the driver core is initialized.
|
||||
*/
|
||||
if (!match->dev.init_name) {
|
||||
char buf[32];
|
||||
|
||||
if (match->id != -1)
|
||||
snprintf(buf, sizeof(buf), "%s.%d",
|
||||
match->name, match->id);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s",
|
||||
match->name);
|
||||
|
||||
match->dev.init_name = kstrdup(buf, GFP_KERNEL);
|
||||
if (!match->dev.init_name)
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (epdrv->pdrv->probe(match))
|
||||
pr_warning("%s: unable to probe %s early.\n",
|
||||
class_str, match->name);
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
* because children are guaranteed to be discovered after parents, and
|
||||
* are inserted at the back of the list on discovery.
|
||||
*
|
||||
* Since device_pm_add() may be called with a device semaphore held,
|
||||
* we must never try to acquire a device semaphore while holding
|
||||
* Since device_pm_add() may be called with a device lock held,
|
||||
* we must never try to acquire a device lock while holding
|
||||
* dpm_list_mutex.
|
||||
*/
|
||||
|
||||
|
@ -508,7 +508,7 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
TRACE_RESUME(0);
|
||||
|
||||
dpm_wait(dev->parent, async);
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
|
||||
dev->power.status = DPM_RESUMING;
|
||||
|
||||
|
@ -543,7 +543,7 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
|
|||
}
|
||||
}
|
||||
End:
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
complete_all(&dev->power.completion);
|
||||
|
||||
TRACE_RESUME(error);
|
||||
|
@ -629,7 +629,7 @@ static void dpm_resume(pm_message_t state)
|
|||
*/
|
||||
static void device_complete(struct device *dev, pm_message_t state)
|
||||
{
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
|
||||
if (dev->class && dev->class->pm && dev->class->pm->complete) {
|
||||
pm_dev_dbg(dev, state, "completing class ");
|
||||
|
@ -646,7 +646,7 @@ static void device_complete(struct device *dev, pm_message_t state)
|
|||
dev->bus->pm->complete(dev);
|
||||
}
|
||||
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -809,7 +809,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
|
|||
int error = 0;
|
||||
|
||||
dpm_wait_for_children(dev, async);
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
|
||||
if (async_error)
|
||||
goto End;
|
||||
|
@ -849,7 +849,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
|
|||
dev->power.status = DPM_OFF;
|
||||
|
||||
End:
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
complete_all(&dev->power.completion);
|
||||
|
||||
return error;
|
||||
|
@ -938,7 +938,7 @@ static int device_prepare(struct device *dev, pm_message_t state)
|
|||
{
|
||||
int error = 0;
|
||||
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
|
||||
if (dev->bus && dev->bus->pm && dev->bus->pm->prepare) {
|
||||
pm_dev_dbg(dev, state, "preparing ");
|
||||
|
@ -962,7 +962,7 @@ static int device_prepare(struct device *dev, pm_message_t state)
|
|||
suspend_report_result(dev->class->pm->prepare, error);
|
||||
}
|
||||
End:
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ sysdev_store(struct kobject *kobj, struct attribute *attr,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
static struct sysfs_ops sysfs_ops = {
|
||||
static const struct sysfs_ops sysfs_ops = {
|
||||
.show = sysdev_show,
|
||||
.store = sysdev_store,
|
||||
};
|
||||
|
@ -89,7 +89,7 @@ static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr,
|
|||
struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr);
|
||||
|
||||
if (class_attr->show)
|
||||
return class_attr->show(class, buffer);
|
||||
return class_attr->show(class, class_attr, buffer);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -100,11 +100,11 @@ static ssize_t sysdev_class_store(struct kobject *kobj, struct attribute *attr,
|
|||
struct sysdev_class_attribute *class_attr = to_sysdev_class_attr(attr);
|
||||
|
||||
if (class_attr->store)
|
||||
return class_attr->store(class, buffer, count);
|
||||
return class_attr->store(class, class_attr, buffer, count);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static struct sysfs_ops sysfs_class_ops = {
|
||||
static const struct sysfs_ops sysfs_class_ops = {
|
||||
.show = sysdev_class_show,
|
||||
.store = sysdev_class_store,
|
||||
};
|
||||
|
@ -145,13 +145,20 @@ int sysdev_class_register(struct sysdev_class *cls)
|
|||
if (retval)
|
||||
return retval;
|
||||
|
||||
return kset_register(&cls->kset);
|
||||
retval = kset_register(&cls->kset);
|
||||
if (!retval && cls->attrs)
|
||||
retval = sysfs_create_files(&cls->kset.kobj,
|
||||
(const struct attribute **)cls->attrs);
|
||||
return retval;
|
||||
}
|
||||
|
||||
void sysdev_class_unregister(struct sysdev_class *cls)
|
||||
{
|
||||
pr_debug("Unregistering sysdev class '%s'\n",
|
||||
kobject_name(&cls->kset.kobj));
|
||||
if (cls->attrs)
|
||||
sysfs_remove_files(&cls->kset.kobj,
|
||||
(const struct attribute **)cls->attrs);
|
||||
kset_unregister(&cls->kset);
|
||||
}
|
||||
|
||||
|
|
|
@ -476,7 +476,9 @@ static void class_osdblk_release(struct class *cls)
|
|||
kfree(cls);
|
||||
}
|
||||
|
||||
static ssize_t class_osdblk_list(struct class *c, char *data)
|
||||
static ssize_t class_osdblk_list(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
char *data)
|
||||
{
|
||||
int n = 0;
|
||||
struct list_head *tmp;
|
||||
|
@ -500,7 +502,9 @@ static ssize_t class_osdblk_list(struct class *c, char *data)
|
|||
return n;
|
||||
}
|
||||
|
||||
static ssize_t class_osdblk_add(struct class *c, const char *buf, size_t count)
|
||||
static ssize_t class_osdblk_add(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct osdblk_device *osdev;
|
||||
ssize_t rc;
|
||||
|
@ -592,7 +596,9 @@ static ssize_t class_osdblk_add(struct class *c, const char *buf, size_t count)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static ssize_t class_osdblk_remove(struct class *c, const char *buf,
|
||||
static ssize_t class_osdblk_remove(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
struct osdblk_device *osdev = NULL;
|
||||
|
|
|
@ -284,7 +284,7 @@ static ssize_t kobj_pkt_store(struct kobject *kobj,
|
|||
return len;
|
||||
}
|
||||
|
||||
static struct sysfs_ops kobj_pkt_ops = {
|
||||
static const struct sysfs_ops kobj_pkt_ops = {
|
||||
.show = kobj_pkt_show,
|
||||
.store = kobj_pkt_store
|
||||
};
|
||||
|
@ -337,7 +337,9 @@ static void class_pktcdvd_release(struct class *cls)
|
|||
{
|
||||
kfree(cls);
|
||||
}
|
||||
static ssize_t class_pktcdvd_show_map(struct class *c, char *data)
|
||||
static ssize_t class_pktcdvd_show_map(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
char *data)
|
||||
{
|
||||
int n = 0;
|
||||
int idx;
|
||||
|
@ -356,7 +358,9 @@ static ssize_t class_pktcdvd_show_map(struct class *c, char *data)
|
|||
return n;
|
||||
}
|
||||
|
||||
static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf,
|
||||
static ssize_t class_pktcdvd_store_add(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned int major, minor;
|
||||
|
@ -376,7 +380,9 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static ssize_t class_pktcdvd_store_remove(struct class *c, const char *buf,
|
||||
static ssize_t class_pktcdvd_store_remove(struct class *c,
|
||||
struct class_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
unsigned int major, minor;
|
||||
|
|
|
@ -139,6 +139,8 @@ struct hvc_iucv_private *hvc_iucv_get_private(uint32_t num)
|
|||
*
|
||||
* This function allocates a new struct iucv_tty_buffer element and, optionally,
|
||||
* allocates an internal data buffer with the specified size @size.
|
||||
* The internal data buffer is always allocated with GFP_DMA which is
|
||||
* required for receiving and sending data with IUCV.
|
||||
* Note: The total message size arises from the internal buffer size and the
|
||||
* members of the iucv_tty_msg structure.
|
||||
* The function returns NULL if memory allocation has failed.
|
||||
|
@ -154,7 +156,7 @@ static struct iucv_tty_buffer *alloc_tty_buffer(size_t size, gfp_t flags)
|
|||
|
||||
if (size > 0) {
|
||||
bufp->msg.length = MSG_SIZE(size);
|
||||
bufp->mbuf = kmalloc(bufp->msg.length, flags);
|
||||
bufp->mbuf = kmalloc(bufp->msg.length, flags | GFP_DMA);
|
||||
if (!bufp->mbuf) {
|
||||
mempool_free(bufp, hvc_iucv_mempool);
|
||||
return NULL;
|
||||
|
@ -237,7 +239,7 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv,
|
|||
if (!rb->mbuf) { /* message not yet received ... */
|
||||
/* allocate mem to store msg data; if no memory is available
|
||||
* then leave the buffer on the list and re-try later */
|
||||
rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC);
|
||||
rb->mbuf = kmalloc(rb->msg.length, GFP_ATOMIC | GFP_DMA);
|
||||
if (!rb->mbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -149,13 +149,12 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start)
|
|||
|
||||
static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate)
|
||||
{
|
||||
struct sh_timer_config *cfg = p->pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
/* enable clock */
|
||||
ret = clk_enable(p->clk);
|
||||
if (ret) {
|
||||
pr_err("sh_cmt: cannot enable clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot enable clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -278,7 +277,7 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
|
|||
delay = 1;
|
||||
|
||||
if (!delay)
|
||||
pr_warning("sh_cmt: too long delay\n");
|
||||
dev_warn(&p->pdev->dev, "too long delay\n");
|
||||
|
||||
} while (delay);
|
||||
}
|
||||
|
@ -288,7 +287,7 @@ static void sh_cmt_set_next(struct sh_cmt_priv *p, unsigned long delta)
|
|||
unsigned long flags;
|
||||
|
||||
if (delta > p->max_match_value)
|
||||
pr_warning("sh_cmt: delta out of range\n");
|
||||
dev_warn(&p->pdev->dev, "delta out of range\n");
|
||||
|
||||
spin_lock_irqsave(&p->lock, flags);
|
||||
p->next_match_value = delta;
|
||||
|
@ -450,7 +449,7 @@ static int sh_cmt_register_clocksource(struct sh_cmt_priv *p,
|
|||
cs->resume = sh_cmt_clocksource_resume;
|
||||
cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8);
|
||||
cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
|
||||
pr_info("sh_cmt: %s used as clock source\n", cs->name);
|
||||
dev_info(&p->pdev->dev, "used as clock source\n");
|
||||
clocksource_register(cs);
|
||||
return 0;
|
||||
}
|
||||
|
@ -496,13 +495,11 @@ static void sh_cmt_clock_event_mode(enum clock_event_mode mode,
|
|||
|
||||
switch (mode) {
|
||||
case CLOCK_EVT_MODE_PERIODIC:
|
||||
pr_info("sh_cmt: %s used for periodic clock events\n",
|
||||
ced->name);
|
||||
dev_info(&p->pdev->dev, "used for periodic clock events\n");
|
||||
sh_cmt_clock_event_start(p, 1);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_ONESHOT:
|
||||
pr_info("sh_cmt: %s used for oneshot clock events\n",
|
||||
ced->name);
|
||||
dev_info(&p->pdev->dev, "used for oneshot clock events\n");
|
||||
sh_cmt_clock_event_start(p, 0);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_SHUTDOWN:
|
||||
|
@ -543,7 +540,7 @@ static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
|
|||
ced->set_next_event = sh_cmt_clock_event_next;
|
||||
ced->set_mode = sh_cmt_clock_event_mode;
|
||||
|
||||
pr_info("sh_cmt: %s used for clock events\n", ced->name);
|
||||
dev_info(&p->pdev->dev, "used for clock events\n");
|
||||
clockevents_register_device(ced);
|
||||
}
|
||||
|
||||
|
@ -600,12 +597,12 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
|
|||
/* map memory, let mapbase point to our channel */
|
||||
p->mapbase = ioremap_nocache(res->start, resource_size(res));
|
||||
if (p->mapbase == NULL) {
|
||||
pr_err("sh_cmt: failed to remap I/O memory\n");
|
||||
dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
|
||||
goto err0;
|
||||
}
|
||||
|
||||
/* request irq using setup_irq() (too early for request_irq()) */
|
||||
p->irqaction.name = cfg->name;
|
||||
p->irqaction.name = dev_name(&p->pdev->dev);
|
||||
p->irqaction.handler = sh_cmt_interrupt;
|
||||
p->irqaction.dev_id = p;
|
||||
p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
|
||||
|
@ -613,7 +610,7 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
|
|||
/* get hold of clock */
|
||||
p->clk = clk_get(&p->pdev->dev, cfg->clk);
|
||||
if (IS_ERR(p->clk)) {
|
||||
pr_err("sh_cmt: cannot get clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot get clock\n");
|
||||
ret = PTR_ERR(p->clk);
|
||||
goto err1;
|
||||
}
|
||||
|
@ -628,17 +625,17 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
|
|||
p->clear_bits = ~0xc000;
|
||||
}
|
||||
|
||||
ret = sh_cmt_register(p, cfg->name,
|
||||
ret = sh_cmt_register(p, (char *)dev_name(&p->pdev->dev),
|
||||
cfg->clockevent_rating,
|
||||
cfg->clocksource_rating);
|
||||
if (ret) {
|
||||
pr_err("sh_cmt: registration failed\n");
|
||||
dev_err(&p->pdev->dev, "registration failed\n");
|
||||
goto err1;
|
||||
}
|
||||
|
||||
ret = setup_irq(irq, &p->irqaction);
|
||||
if (ret) {
|
||||
pr_err("sh_cmt: failed to request irq %d\n", irq);
|
||||
dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
|
@ -653,11 +650,10 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
|
|||
static int __devinit sh_cmt_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sh_cmt_priv *p = platform_get_drvdata(pdev);
|
||||
struct sh_timer_config *cfg = pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
if (p) {
|
||||
pr_info("sh_cmt: %s kept as earlytimer\n", cfg->name);
|
||||
dev_info(&pdev->dev, "kept as earlytimer\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,13 +118,12 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
|
|||
|
||||
static int sh_mtu2_enable(struct sh_mtu2_priv *p)
|
||||
{
|
||||
struct sh_timer_config *cfg = p->pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
/* enable clock */
|
||||
ret = clk_enable(p->clk);
|
||||
if (ret) {
|
||||
pr_err("sh_mtu2: cannot enable clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot enable clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -193,8 +192,7 @@ static void sh_mtu2_clock_event_mode(enum clock_event_mode mode,
|
|||
|
||||
switch (mode) {
|
||||
case CLOCK_EVT_MODE_PERIODIC:
|
||||
pr_info("sh_mtu2: %s used for periodic clock events\n",
|
||||
ced->name);
|
||||
dev_info(&p->pdev->dev, "used for periodic clock events\n");
|
||||
sh_mtu2_enable(p);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_UNUSED:
|
||||
|
@ -221,13 +219,13 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_priv *p,
|
|||
ced->cpumask = cpumask_of(0);
|
||||
ced->set_mode = sh_mtu2_clock_event_mode;
|
||||
|
||||
pr_info("sh_mtu2: %s used for clock events\n", ced->name);
|
||||
dev_info(&p->pdev->dev, "used for clock events\n");
|
||||
clockevents_register_device(ced);
|
||||
|
||||
ret = setup_irq(p->irqaction.irq, &p->irqaction);
|
||||
if (ret) {
|
||||
pr_err("sh_mtu2: failed to request irq %d\n",
|
||||
p->irqaction.irq);
|
||||
dev_err(&p->pdev->dev, "failed to request irq %d\n",
|
||||
p->irqaction.irq);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -273,12 +271,12 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
|
|||
/* map memory, let mapbase point to our channel */
|
||||
p->mapbase = ioremap_nocache(res->start, resource_size(res));
|
||||
if (p->mapbase == NULL) {
|
||||
pr_err("sh_mtu2: failed to remap I/O memory\n");
|
||||
dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
|
||||
goto err0;
|
||||
}
|
||||
|
||||
/* setup data for setup_irq() (too early for request_irq()) */
|
||||
p->irqaction.name = cfg->name;
|
||||
p->irqaction.name = dev_name(&p->pdev->dev);
|
||||
p->irqaction.handler = sh_mtu2_interrupt;
|
||||
p->irqaction.dev_id = p;
|
||||
p->irqaction.irq = irq;
|
||||
|
@ -287,12 +285,13 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
|
|||
/* get hold of clock */
|
||||
p->clk = clk_get(&p->pdev->dev, cfg->clk);
|
||||
if (IS_ERR(p->clk)) {
|
||||
pr_err("sh_mtu2: cannot get clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot get clock\n");
|
||||
ret = PTR_ERR(p->clk);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
return sh_mtu2_register(p, cfg->name, cfg->clockevent_rating);
|
||||
return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
|
||||
cfg->clockevent_rating);
|
||||
err1:
|
||||
iounmap(p->mapbase);
|
||||
err0:
|
||||
|
@ -302,11 +301,10 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
|
|||
static int __devinit sh_mtu2_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sh_mtu2_priv *p = platform_get_drvdata(pdev);
|
||||
struct sh_timer_config *cfg = pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
if (p) {
|
||||
pr_info("sh_mtu2: %s kept as earlytimer\n", cfg->name);
|
||||
dev_info(&pdev->dev, "kept as earlytimer\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,13 +106,12 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start)
|
|||
|
||||
static int sh_tmu_enable(struct sh_tmu_priv *p)
|
||||
{
|
||||
struct sh_timer_config *cfg = p->pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
/* enable clock */
|
||||
ret = clk_enable(p->clk);
|
||||
if (ret) {
|
||||
pr_err("sh_tmu: cannot enable clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot enable clock\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -228,7 +227,7 @@ static int sh_tmu_register_clocksource(struct sh_tmu_priv *p,
|
|||
cs->disable = sh_tmu_clocksource_disable;
|
||||
cs->mask = CLOCKSOURCE_MASK(32);
|
||||
cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
|
||||
pr_info("sh_tmu: %s used as clock source\n", cs->name);
|
||||
dev_info(&p->pdev->dev, "used as clock source\n");
|
||||
clocksource_register(cs);
|
||||
return 0;
|
||||
}
|
||||
|
@ -276,13 +275,11 @@ static void sh_tmu_clock_event_mode(enum clock_event_mode mode,
|
|||
|
||||
switch (mode) {
|
||||
case CLOCK_EVT_MODE_PERIODIC:
|
||||
pr_info("sh_tmu: %s used for periodic clock events\n",
|
||||
ced->name);
|
||||
dev_info(&p->pdev->dev, "used for periodic clock events\n");
|
||||
sh_tmu_clock_event_start(p, 1);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_ONESHOT:
|
||||
pr_info("sh_tmu: %s used for oneshot clock events\n",
|
||||
ced->name);
|
||||
dev_info(&p->pdev->dev, "used for oneshot clock events\n");
|
||||
sh_tmu_clock_event_start(p, 0);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_UNUSED:
|
||||
|
@ -323,13 +320,13 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p,
|
|||
ced->set_next_event = sh_tmu_clock_event_next;
|
||||
ced->set_mode = sh_tmu_clock_event_mode;
|
||||
|
||||
pr_info("sh_tmu: %s used for clock events\n", ced->name);
|
||||
dev_info(&p->pdev->dev, "used for clock events\n");
|
||||
clockevents_register_device(ced);
|
||||
|
||||
ret = setup_irq(p->irqaction.irq, &p->irqaction);
|
||||
if (ret) {
|
||||
pr_err("sh_tmu: failed to request irq %d\n",
|
||||
p->irqaction.irq);
|
||||
dev_err(&p->pdev->dev, "failed to request irq %d\n",
|
||||
p->irqaction.irq);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -378,12 +375,12 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
|
|||
/* map memory, let mapbase point to our channel */
|
||||
p->mapbase = ioremap_nocache(res->start, resource_size(res));
|
||||
if (p->mapbase == NULL) {
|
||||
pr_err("sh_tmu: failed to remap I/O memory\n");
|
||||
dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
|
||||
goto err0;
|
||||
}
|
||||
|
||||
/* setup data for setup_irq() (too early for request_irq()) */
|
||||
p->irqaction.name = cfg->name;
|
||||
p->irqaction.name = dev_name(&p->pdev->dev);
|
||||
p->irqaction.handler = sh_tmu_interrupt;
|
||||
p->irqaction.dev_id = p;
|
||||
p->irqaction.irq = irq;
|
||||
|
@ -392,12 +389,12 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
|
|||
/* get hold of clock */
|
||||
p->clk = clk_get(&p->pdev->dev, cfg->clk);
|
||||
if (IS_ERR(p->clk)) {
|
||||
pr_err("sh_tmu: cannot get clock \"%s\"\n", cfg->clk);
|
||||
dev_err(&p->pdev->dev, "cannot get clock\n");
|
||||
ret = PTR_ERR(p->clk);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
return sh_tmu_register(p, cfg->name,
|
||||
return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
|
||||
cfg->clockevent_rating,
|
||||
cfg->clocksource_rating);
|
||||
err1:
|
||||
|
@ -409,11 +406,10 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
|
|||
static int __devinit sh_tmu_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct sh_tmu_priv *p = platform_get_drvdata(pdev);
|
||||
struct sh_timer_config *cfg = pdev->dev.platform_data;
|
||||
int ret;
|
||||
|
||||
if (p) {
|
||||
pr_info("sh_tmu: %s kept as earlytimer\n", cfg->name);
|
||||
dev_info(&pdev->dev, "kept as earlytimer\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -766,7 +766,7 @@ static void cpufreq_sysfs_release(struct kobject *kobj)
|
|||
complete(&policy->kobj_unregister);
|
||||
}
|
||||
|
||||
static struct sysfs_ops sysfs_ops = {
|
||||
static const struct sysfs_ops sysfs_ops = {
|
||||
.show = show,
|
||||
.store = store,
|
||||
};
|
||||
|
|
|
@ -22,6 +22,7 @@ static int __init cpuidle_sysfs_setup(char *unused)
|
|||
__setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup);
|
||||
|
||||
static ssize_t show_available_governors(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
ssize_t i = 0;
|
||||
|
@ -41,6 +42,7 @@ static ssize_t show_available_governors(struct sysdev_class *class,
|
|||
}
|
||||
|
||||
static ssize_t show_current_driver(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
@ -56,6 +58,7 @@ static ssize_t show_current_driver(struct sysdev_class *class,
|
|||
}
|
||||
|
||||
static ssize_t show_current_governor(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
@ -71,6 +74,7 @@ static ssize_t show_current_governor(struct sysdev_class *class,
|
|||
}
|
||||
|
||||
static ssize_t store_current_governor(struct sysdev_class *class,
|
||||
struct sysdev_class_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
char gov_name[CPUIDLE_NAME_LEN];
|
||||
|
@ -191,7 +195,7 @@ static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops cpuidle_sysfs_ops = {
|
||||
static const struct sysfs_ops cpuidle_sysfs_ops = {
|
||||
.show = cpuidle_show,
|
||||
.store = cpuidle_store,
|
||||
};
|
||||
|
@ -277,7 +281,7 @@ static ssize_t cpuidle_state_show(struct kobject * kobj,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops cpuidle_state_sysfs_ops = {
|
||||
static const struct sysfs_ops cpuidle_state_sysfs_ops = {
|
||||
.show = cpuidle_state_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -1138,7 +1138,7 @@ ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
|
|||
return entry->show(&chan->common, page);
|
||||
}
|
||||
|
||||
struct sysfs_ops ioat_sysfs_ops = {
|
||||
const struct sysfs_ops ioat_sysfs_ops = {
|
||||
.show = ioat_attr_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ bool ioat_cleanup_preamble(struct ioat_chan_common *chan,
|
|||
unsigned long *phys_complete);
|
||||
void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type);
|
||||
void ioat_kobject_del(struct ioatdma_device *device);
|
||||
extern struct sysfs_ops ioat_sysfs_ops;
|
||||
extern const struct sysfs_ops ioat_sysfs_ops;
|
||||
extern struct ioat_sysfs_entry ioat_version_attr;
|
||||
extern struct ioat_sysfs_entry ioat_cap_attr;
|
||||
#endif /* IOATDMA_H */
|
||||
|
|
|
@ -137,7 +137,7 @@ static ssize_t edac_dev_ctl_info_store(struct kobject *kobj,
|
|||
}
|
||||
|
||||
/* edac_dev file operations for an 'ctl_info' */
|
||||
static struct sysfs_ops device_ctl_info_ops = {
|
||||
static const struct sysfs_ops device_ctl_info_ops = {
|
||||
.show = edac_dev_ctl_info_show,
|
||||
.store = edac_dev_ctl_info_store
|
||||
};
|
||||
|
@ -373,7 +373,7 @@ static ssize_t edac_dev_instance_store(struct kobject *kobj,
|
|||
}
|
||||
|
||||
/* edac_dev file operations for an 'instance' */
|
||||
static struct sysfs_ops device_instance_ops = {
|
||||
static const struct sysfs_ops device_instance_ops = {
|
||||
.show = edac_dev_instance_show,
|
||||
.store = edac_dev_instance_store
|
||||
};
|
||||
|
@ -476,7 +476,7 @@ static ssize_t edac_dev_block_store(struct kobject *kobj,
|
|||
}
|
||||
|
||||
/* edac_dev file operations for a 'block' */
|
||||
static struct sysfs_ops device_block_ops = {
|
||||
static const struct sysfs_ops device_block_ops = {
|
||||
.show = edac_dev_block_show,
|
||||
.store = edac_dev_block_store
|
||||
};
|
||||
|
|
|
@ -245,7 +245,7 @@ static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
static struct sysfs_ops csrowfs_ops = {
|
||||
static const struct sysfs_ops csrowfs_ops = {
|
||||
.show = csrowdev_show,
|
||||
.store = csrowdev_store
|
||||
};
|
||||
|
@ -575,7 +575,7 @@ static ssize_t mcidev_store(struct kobject *kobj, struct attribute *attr,
|
|||
}
|
||||
|
||||
/* Intermediate show/store table */
|
||||
static struct sysfs_ops mci_ops = {
|
||||
static const struct sysfs_ops mci_ops = {
|
||||
.show = mcidev_show,
|
||||
.store = mcidev_store
|
||||
};
|
||||
|
|
|
@ -121,7 +121,7 @@ static ssize_t edac_pci_instance_store(struct kobject *kobj,
|
|||
}
|
||||
|
||||
/* fs_ops table */
|
||||
static struct sysfs_ops pci_instance_ops = {
|
||||
static const struct sysfs_ops pci_instance_ops = {
|
||||
.show = edac_pci_instance_show,
|
||||
.store = edac_pci_instance_store
|
||||
};
|
||||
|
@ -261,7 +261,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
static struct sysfs_ops edac_pci_sysfs_ops = {
|
||||
static const struct sysfs_ops edac_pci_sysfs_ops = {
|
||||
.show = edac_pci_dev_show,
|
||||
.store = edac_pci_dev_store
|
||||
};
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
@ -828,9 +827,9 @@ static int update_unit(struct device *dev, void *data)
|
|||
struct fw_driver *driver = (struct fw_driver *)dev->driver;
|
||||
|
||||
if (is_fw_unit(dev) && driver != NULL && driver->update != NULL) {
|
||||
down(&dev->sem);
|
||||
device_lock(dev);
|
||||
driver->update(unit);
|
||||
up(&dev->sem);
|
||||
device_unlock(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -122,7 +122,7 @@ edd_attr_show(struct kobject * kobj, struct attribute *attr, char *buf)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops edd_attr_ops = {
|
||||
static const struct sysfs_ops edd_attr_ops = {
|
||||
.show = edd_attr_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops efivar_attr_ops = {
|
||||
static const struct sysfs_ops efivar_attr_ops = {
|
||||
.show = efivar_attr_show,
|
||||
.store = efivar_attr_store,
|
||||
};
|
||||
|
|
|
@ -519,7 +519,7 @@ static ssize_t ibft_show_attribute(struct kobject *kobj,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static struct sysfs_ops ibft_attr_ops = {
|
||||
static const struct sysfs_ops ibft_attr_ops = {
|
||||
.show = ibft_show_attribute,
|
||||
};
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ static struct attribute *def_attrs[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static struct sysfs_ops memmap_attr_ops = {
|
||||
static const struct sysfs_ops memmap_attr_ops = {
|
||||
.show = memmap_attr_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -623,7 +623,9 @@ static const struct attribute_group gpiochip_attr_group = {
|
|||
* /sys/class/gpio/unexport ... write-only
|
||||
* integer N ... number of GPIO to unexport
|
||||
*/
|
||||
static ssize_t export_store(struct class *class, const char *buf, size_t len)
|
||||
static ssize_t export_store(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
long gpio;
|
||||
int status;
|
||||
|
@ -653,7 +655,9 @@ static ssize_t export_store(struct class *class, const char *buf, size_t len)
|
|||
return status ? : len;
|
||||
}
|
||||
|
||||
static ssize_t unexport_store(struct class *class, const char *buf, size_t len)
|
||||
static ssize_t unexport_store(struct class *class,
|
||||
struct class_attribute *attr,
|
||||
const char *buf, size_t len)
|
||||
{
|
||||
long gpio;
|
||||
int status;
|
||||
|
|
|
@ -70,19 +70,17 @@ static int drm_class_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Display the version of drm_core. This doesn't work right in current design */
|
||||
static ssize_t version_show(struct class *dev, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%s %d.%d.%d %s\n", CORE_NAME, CORE_MAJOR,
|
||||
CORE_MINOR, CORE_PATCHLEVEL, CORE_DATE);
|
||||
}
|
||||
|
||||
static char *drm_devnode(struct device *dev, mode_t *mode)
|
||||
{
|
||||
return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev));
|
||||
}
|
||||
|
||||
static CLASS_ATTR(version, S_IRUGO, version_show, NULL);
|
||||
static CLASS_ATTR_STRING(version, S_IRUGO,
|
||||
CORE_NAME " "
|
||||
__stringify(CORE_MAJOR) "."
|
||||
__stringify(CORE_MINOR) "."
|
||||
__stringify(CORE_PATCHLEVEL) " "
|
||||
CORE_DATE);
|
||||
|
||||
/**
|
||||
* drm_sysfs_create - create a struct drm_sysfs_class structure
|
||||
|
@ -109,7 +107,7 @@ struct class *drm_sysfs_create(struct module *owner, char *name)
|
|||
class->suspend = drm_class_suspend;
|
||||
class->resume = drm_class_resume;
|
||||
|
||||
err = class_create_file(class, &class_attr_version);
|
||||
err = class_create_file(class, &class_attr_version.attr);
|
||||
if (err)
|
||||
goto err_out_class;
|
||||
|
||||
|
@ -132,7 +130,7 @@ void drm_sysfs_destroy(void)
|
|||
{
|
||||
if ((drm_class == NULL) || (IS_ERR(drm_class)))
|
||||
return;
|
||||
class_remove_file(drm_class, &class_attr_version);
|
||||
class_remove_file(drm_class, &class_attr_version.attr);
|
||||
class_destroy(drm_class);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ static struct attribute *ttm_bo_global_attrs[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static struct sysfs_ops ttm_bo_global_ops = {
|
||||
static const struct sysfs_ops ttm_bo_global_ops = {
|
||||
.show = &ttm_bo_global_show
|
||||
};
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ static struct attribute *ttm_mem_zone_attrs[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static struct sysfs_ops ttm_mem_zone_ops = {
|
||||
static const struct sysfs_ops ttm_mem_zone_ops = {
|
||||
.show = &ttm_mem_zone_show,
|
||||
.store = &ttm_mem_zone_store
|
||||
};
|
||||
|
|
|
@ -850,7 +850,7 @@ static const struct i2c_algorithm omap_i2c_algo = {
|
|||
.functionality = omap_i2c_func,
|
||||
};
|
||||
|
||||
static int __init
|
||||
static int __devinit
|
||||
omap_i2c_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_i2c_dev *dev;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <linux/moduleparam.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/freezer.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#include "csr.h"
|
||||
|
@ -1397,9 +1396,9 @@ static int update_pdrv(struct device *dev, void *data)
|
|||
pdrv = container_of(drv, struct hpsb_protocol_driver,
|
||||
driver);
|
||||
if (pdrv->update) {
|
||||
down(&ud->device.sem);
|
||||
device_lock(&ud->device);
|
||||
error = pdrv->update(ud);
|
||||
up(&ud->device.sem);
|
||||
device_unlock(&ud->device);
|
||||
}
|
||||
if (error)
|
||||
device_release_driver(&ud->device);
|
||||
|
|
|
@ -3597,7 +3597,7 @@ static ssize_t cm_show_counter(struct kobject *obj, struct attribute *attr,
|
|||
atomic_long_read(&group->counter[cm_attr->index]));
|
||||
}
|
||||
|
||||
static struct sysfs_ops cm_counter_ops = {
|
||||
static const struct sysfs_ops cm_counter_ops = {
|
||||
.show = cm_show_counter
|
||||
};
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ static ssize_t port_attr_show(struct kobject *kobj,
|
|||
return port_attr->show(p, port_attr, buf);
|
||||
}
|
||||
|
||||
static struct sysfs_ops port_sysfs_ops = {
|
||||
static const struct sysfs_ops port_sysfs_ops = {
|
||||
.show = port_attr_show
|
||||
};
|
||||
|
||||
|
|
|
@ -1336,11 +1336,8 @@ static void ib_ucm_remove_one(struct ib_device *device)
|
|||
device_unregister(&ucm_dev->dev);
|
||||
}
|
||||
|
||||
static ssize_t show_abi_version(struct class *class, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", IB_USER_CM_ABI_VERSION);
|
||||
}
|
||||
static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
|
||||
static CLASS_ATTR_STRING(abi_version, S_IRUGO,
|
||||
__stringify(IB_USER_CM_ABI_VERSION));
|
||||
|
||||
static int __init ib_ucm_init(void)
|
||||
{
|
||||
|
@ -1353,7 +1350,7 @@ static int __init ib_ucm_init(void)
|
|||
goto error1;
|
||||
}
|
||||
|
||||
ret = class_create_file(&cm_class, &class_attr_abi_version);
|
||||
ret = class_create_file(&cm_class, &class_attr_abi_version.attr);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "ucm: couldn't create abi_version attribute\n");
|
||||
goto error2;
|
||||
|
@ -1367,7 +1364,7 @@ static int __init ib_ucm_init(void)
|
|||
return 0;
|
||||
|
||||
error3:
|
||||
class_remove_file(&cm_class, &class_attr_abi_version);
|
||||
class_remove_file(&cm_class, &class_attr_abi_version.attr);
|
||||
error2:
|
||||
unregister_chrdev_region(IB_UCM_BASE_DEV, IB_UCM_MAX_DEVICES);
|
||||
error1:
|
||||
|
@ -1377,7 +1374,7 @@ static int __init ib_ucm_init(void)
|
|||
static void __exit ib_ucm_cleanup(void)
|
||||
{
|
||||
ib_unregister_client(&ucm_client);
|
||||
class_remove_file(&cm_class, &class_attr_abi_version);
|
||||
class_remove_file(&cm_class, &class_attr_abi_version.attr);
|
||||
unregister_chrdev_region(IB_UCM_BASE_DEV, IB_UCM_MAX_DEVICES);
|
||||
if (overflow_maj)
|
||||
unregister_chrdev_region(overflow_maj, IB_UCM_MAX_DEVICES);
|
||||
|
|
|
@ -965,11 +965,8 @@ static ssize_t show_port(struct device *dev, struct device_attribute *attr,
|
|||
}
|
||||
static DEVICE_ATTR(port, S_IRUGO, show_port, NULL);
|
||||
|
||||
static ssize_t show_abi_version(struct class *class, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", IB_USER_MAD_ABI_VERSION);
|
||||
}
|
||||
static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
|
||||
static CLASS_ATTR_STRING(abi_version, S_IRUGO,
|
||||
__stringify(IB_USER_MAD_ABI_VERSION));
|
||||
|
||||
static dev_t overflow_maj;
|
||||
static DECLARE_BITMAP(overflow_map, IB_UMAD_MAX_PORTS);
|
||||
|
@ -1194,7 +1191,7 @@ static int __init ib_umad_init(void)
|
|||
goto out_chrdev;
|
||||
}
|
||||
|
||||
ret = class_create_file(umad_class, &class_attr_abi_version);
|
||||
ret = class_create_file(umad_class, &class_attr_abi_version.attr);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "user_mad: couldn't create abi_version attribute\n");
|
||||
goto out_class;
|
||||
|
|
|
@ -691,11 +691,8 @@ static ssize_t show_dev_abi_version(struct device *device,
|
|||
}
|
||||
static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL);
|
||||
|
||||
static ssize_t show_abi_version(struct class *class, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", IB_USER_VERBS_ABI_VERSION);
|
||||
}
|
||||
static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
|
||||
static CLASS_ATTR_STRING(abi_version, S_IRUGO,
|
||||
__stringify(IB_USER_VERBS_ABI_VERSION));
|
||||
|
||||
static dev_t overflow_maj;
|
||||
static DECLARE_BITMAP(overflow_map, IB_UVERBS_MAX_DEVICES);
|
||||
|
@ -841,7 +838,7 @@ static int __init ib_uverbs_init(void)
|
|||
goto out_chrdev;
|
||||
}
|
||||
|
||||
ret = class_create_file(uverbs_class, &class_attr_abi_version);
|
||||
ret = class_create_file(uverbs_class, &class_attr_abi_version.attr);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "user_verbs: couldn't create abi_version attribute\n");
|
||||
goto out_class;
|
||||
|
|
|
@ -321,6 +321,7 @@ int wf_register_sensor(struct wf_sensor *new_sr)
|
|||
kref_init(&new_sr->ref);
|
||||
list_add(&new_sr->link, &wf_sensors);
|
||||
|
||||
sysfs_attr_init(&new_sr->attr.attr);
|
||||
new_sr->attr.attr.name = new_sr->name;
|
||||
new_sr->attr.attr.mode = 0444;
|
||||
new_sr->attr.show = wf_show_sensor;
|
||||
|
|
|
@ -173,6 +173,7 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node,
|
|||
|
||||
fct->fan_type = pwm_fan;
|
||||
fct->ctrl.type = pwm_fan ? WF_CONTROL_PWM_FAN : WF_CONTROL_RPM_FAN;
|
||||
sysfs_attr_init(&fct->ctrl.attr.attr);
|
||||
|
||||
/* We use the name & location here the same way we do for SMU sensors,
|
||||
* see the comment in windfarm_smu_sensors.c. The locations are a bit
|
||||
|
|
|
@ -75,7 +75,7 @@ static struct attribute *dm_attrs[] = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static struct sysfs_ops dm_sysfs_ops = {
|
||||
static const struct sysfs_ops dm_sysfs_ops = {
|
||||
.show = dm_attr_show,
|
||||
};
|
||||
|
||||
|
|
|
@ -2642,7 +2642,7 @@ static void rdev_free(struct kobject *ko)
|
|||
mdk_rdev_t *rdev = container_of(ko, mdk_rdev_t, kobj);
|
||||
kfree(rdev);
|
||||
}
|
||||
static struct sysfs_ops rdev_sysfs_ops = {
|
||||
static const struct sysfs_ops rdev_sysfs_ops = {
|
||||
.show = rdev_attr_show,
|
||||
.store = rdev_attr_store,
|
||||
};
|
||||
|
@ -4059,7 +4059,7 @@ static void md_free(struct kobject *ko)
|
|||
kfree(mddev);
|
||||
}
|
||||
|
||||
static struct sysfs_ops md_sysfs_ops = {
|
||||
static const struct sysfs_ops md_sysfs_ops = {
|
||||
.show = md_attr_show,
|
||||
.store = md_attr_store,
|
||||
};
|
||||
|
|
|
@ -1735,7 +1735,7 @@ static struct v4l2_int_device omap24xxcam = {
|
|||
*
|
||||
*/
|
||||
|
||||
static int __init omap24xxcam_probe(struct platform_device *pdev)
|
||||
static int __devinit omap24xxcam_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct omap24xxcam_device *cam;
|
||||
struct resource *mem;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue