本文整理汇总了C++中set_kset_name函数的典型用法代码示例。如果您正苦于以下问题:C++ set_kset_name函数的具体用法?C++ set_kset_name怎么用?C++ set_kset_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了set_kset_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: cmx270_resume
}
static int cmx270_resume(struct sys_device *dev)
{
cmx270_pci_resume();
/* restore MSC registers */
MSC0 = sleep_save_msc[0];
MSC1 = sleep_save_msc[1];
MSC2 = sleep_save_msc[2];
return 0;
}
static struct sysdev_class cmx270_pm_sysclass = {
set_kset_name("pm"),
.resume = cmx270_resume,
.suspend = cmx270_suspend,
};
static struct sys_device cmx270_pm_device = {
.cls = &cmx270_pm_sysclass,
};
static int __init cmx270_pm_init(void)
{
int error;
error = sysdev_class_register(&cmx270_pm_sysclass);
if (error == 0)
error = sysdev_register(&cmx270_pm_device);
return error;
开发者ID:PennPanda,项目名称:linux-repo,代码行数:31,代码来源:cm-x270.c
示例2: set_kset_name
* drivers/base/cpu.c - basic CPU class support
*/
#include <linux/sysdev.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/cpu.h>
#include <linux/topology.h>
#include <linux/device.h>
#include <linux/node.h>
#include "base.h"
struct sysdev_class cpu_sysdev_class = {
set_kset_name("cpu"),
};
EXPORT_SYMBOL(cpu_sysdev_class);
static struct sys_device *cpu_sys_devices[NR_CPUS];
#ifdef CONFIG_HOTPLUG_CPU
static ssize_t show_online(struct sys_device *dev, char *buf)
{
struct cpu *cpu = container_of(dev, struct cpu, sysdev);
return sprintf(buf, "%u\n", !!cpu_online(cpu->sysdev.id));
}
static ssize_t store_online(struct sys_device *dev, const char *buf,
size_t count)
开发者ID:B-Rich,项目名称:linux_drivers,代码行数:31,代码来源:cpu.c
示例3: set_kset_name
struct sa1100irq_state *st = &sa1100irq_state;
if (st->saved) {
ICCR = st->iccr;
ICLR = st->iclr;
GRER = GPIO_IRQ_rising_edge & GPIO_IRQ_mask;
GFER = GPIO_IRQ_falling_edge & GPIO_IRQ_mask;
ICMR = st->icmr;
}
return 0;
}
static struct sysdev_class sa1100irq_sysclass = {
set_kset_name("sa11x0-irq"),
.suspend = sa1100irq_suspend,
.resume = sa1100irq_resume,
};
static struct sys_device sa1100irq_device = {
.id = 0,
.cls = &sa1100irq_sysclass,
};
static int __init sa1100irq_init_devicefs(void)
{
sysdev_class_register(&sa1100irq_sysclass);
return sysdev_register(&sa1100irq_device);
}
开发者ID:12019,项目名称:hg556a_source,代码行数:30,代码来源:irq.c
示例4: s3c2410_dma_resume
return 0;
}
static int s3c2410_dma_resume(struct sys_device *dev)
{
return 0;
}
#else
#define s3c2410_dma_suspend NULL
#define s3c2410_dma_resume NULL
#endif /* CONFIG_PM */
static struct sysdev_class dma_sysclass = {
set_kset_name("s3c24xx-dma"),
.suspend = s3c2410_dma_suspend,
.resume = s3c2410_dma_resume,
};
/* kmem cache implementation */
static void s3c2410_dma_cache_ctor(void *p, kmem_cache_t *c, unsigned long f)
{
memset(p, 0, sizeof(s3c2410_dma_buf_t));
}
/* initialisation code */
static int __init s3c2410_init_dma(void)
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:30,代码来源:dma.c
示例5: set_kset_name
static const char *edac_caps[] = {
[EDAC_UNKNOWN] = "Unknown",
[EDAC_NONE] = "None",
[EDAC_RESERVED] = "Reserved",
[EDAC_PARITY] = "PARITY",
[EDAC_EC] = "EC",
[EDAC_SECDED] = "SECDED",
[EDAC_S2ECD2ED] = "S2ECD2ED",
[EDAC_S4ECD4ED] = "S4ECD4ED",
[EDAC_S8ECD8ED] = "S8ECD8ED",
[EDAC_S16ECD16ED] = "S16ECD16ED"
};
/* sysfs object: /sys/devices/system/edac */
static struct sysdev_class edac_class = {
set_kset_name("edac"),
};
/* sysfs object:
* /sys/devices/system/edac/mc
*/
static struct kobject edac_memctrl_kobj;
/* We use these to wait for the reference counts on edac_memctrl_kobj and
* edac_pci_kobj to reach 0.
*/
static struct completion edac_memctrl_kobj_complete;
/*
* /sys/devices/system/edac/mc;
* data structures and methods
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:31,代码来源:edac_mc.c
示例6: s3c244x_resume
static int s3c244x_resume(struct sys_device *dev)
{
s3c2410_pm_do_restore(s3c244x_sleep, ARRAY_SIZE(s3c244x_sleep));
return 0;
}
#else
#define s3c244x_suspend NULL
#define s3c244x_resume NULL
#endif
/* Since the S3C2442 and S3C2440 share items, put both sysclasses here */
struct sysdev_class s3c2440_sysclass = {
set_kset_name("s3c2440-core"),
.suspend = s3c244x_suspend,
.resume = s3c244x_resume
};
struct sysdev_class s3c2442_sysclass = {
set_kset_name("s3c2442-core"),
.suspend = s3c244x_suspend,
.resume = s3c244x_resume
};
/* need to register class before we actually register the device, and
* we also need to ensure that it has been initialised before any of the
* drivers even try to use it (even if not on an s3c2440 based system)
* as a driver which may support both 2410 and 2440 may try and use it.
*/
开发者ID:pook66,项目名称:samsung-s3c6410-android.1.0,代码行数:30,代码来源:s3c244x.c
示例7: set_irq_chained_handler
MST_INTSETCLR = 0;
set_irq_chained_handler(IRQ_GPIO(0), mainstone_irq_handler);
set_irq_type(IRQ_GPIO(0), IRQT_FALLING);
}
#ifdef CONFIG_PM
static int mainstone_irq_resume(struct sys_device *dev)
{
MST_INTMSKENA = mainstone_irq_enabled;
return 0;
}
static struct sysdev_class mainstone_irq_sysclass = {
set_kset_name("cpld_irq"),
.resume = mainstone_irq_resume,
};
static struct sys_device mainstone_irq_device = {
.cls = &mainstone_irq_sysclass,
};
static int __init mainstone_irq_device_init(void)
{
int ret = sysdev_class_register(&mainstone_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&mainstone_irq_device);
return ret;
}
开发者ID:ManiacTwister,项目名称:linux-hnd,代码行数:30,代码来源:mainstone.c
示例8: osiris_pm_resume
static int osiris_pm_resume(struct sys_device *sd)
{
if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8)
__raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1);
return 0;
}
#else
#define osiris_pm_suspend NULL
#define osiris_pm_resume NULL
#endif
static struct sysdev_class osiris_pm_sysclass = {
set_kset_name("mach-osiris"),
.suspend = osiris_pm_suspend,
.resume = osiris_pm_resume,
};
static struct sys_device osiris_pm_sysdev = {
.cls = &osiris_pm_sysclass,
};
/* Standard Osiris devices */
static struct platform_device *osiris_devices[] __initdata = {
&s3c_device_i2c,
&s3c_device_wdt,
&s3c_device_nand,
&osiris_pcmcia,
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:30,代码来源:mach-osiris.c
示例9: IODESC_ENT
#include <asm/plat-s3c24xx/devs.h>
#include <asm/plat-s3c24xx/common-smdk.h>
#include <asm/plat-s3c24xx/cpu.h>
static struct map_desc s3c2443_iodesc[] __initdata = {
IODESC_ENT(WATCHDOG),
IODESC_ENT(CLKPWR),
IODESC_ENT(TIMER),
IODESC_ENT(LCD),
IODESC_ENT(EBI),
IODESC_ENT(SROMC),
IODESC_ENT(CS8900),
};
struct sysdev_class s3c2443_sysclass = {
set_kset_name("s3c2443-core"),
};
static struct sys_device s3c2443_sysdev = {
.cls = &s3c2443_sysclass,
};
static void s3c2443_hard_reset(void)
{
__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
}
int __init s3c2443_init(void)
{
printk("S3C2443: Initialising architecture\n");
开发者ID:iamnpc,项目名称:samsung-s3c6410-android.1.0,代码行数:30,代码来源:s3c2443.c
示例10: set_irq_chained_handler
MST_INTSETCLR = 0;
set_irq_chained_handler(IRQ_GPIO(0), mainstone_irq_handler);
set_irq_type(IRQ_GPIO(0), IRQT_FALLING);
}
#ifdef CONFIG_PM
static int mainstone_irq_resume(struct sys_device *dev)
{
MST_INTMSKENA = mainstone_irq_enabled;
return 0;
}
static struct sysdev_class mainstone_irq_sysclass = {
set_kset_name("mst_irq"),
.resume = mainstone_irq_resume,
};
static struct sys_device mainstone_irq_device = {
.id = -1,
.cls = &mainstone_irq_sysclass,
};
static int __init mainstone_irq_device_init(void)
{
int ret = sysdev_class_register(&mainstone_irq_sysclass);
if (ret == 0)
ret = sysdev_register(&mainstone_irq_device);
return ret;
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:31,代码来源:mainstone.c
示例11: test_resume
}
struct class_interface test_interface = {
.class = &test_class,
.add = &test_intf_add,
.remove = &test_intf_rem,
};
/* my sys_device stuff */
int test_resume(struct sys_device *dev) {
printk("tbase: Entered test resume for sys device\n");
return 0;
}
struct sysdev_class test_sysclass = {
set_kset_name("TestSysclass"),
.resume = test_resume,
};
struct sys_device test_sys_device = {
.id = 0,
.cls = &test_sysclass,
};
/* my attribute stuff */
static inline ssize_t
store_new_id(struct device_driver * driver, const char * buf, size_t count) {
printk("tbase: Entered store new id\n");
return count;
}
开发者ID:joyforu,项目名称:android-ltp-ndk,代码行数:30,代码来源:tbase.c
示例12: IODESC_ENT
#include <asm/plat-s3c24xx/common-smdk.h>
#include <asm/plat-s3c24xx/cpu.h>
static struct map_desc s3c2416_iodesc[] __initdata = {
IODESC_ENT(WATCHDOG),
IODESC_ENT(CLKPWR),
IODESC_ENT(TIMER),
IODESC_ENT(LCD),
IODESC_ENT(EBI),
IODESC_ENT(SROMC),
IODESC_ENT(CS8900),
IODESC_ENT(USBDEV),
};
struct sysdev_class s3c2416_sysclass = {
set_kset_name("s3c2416-core"),
};
static struct sys_device s3c2416_sysdev = {
.cls = &s3c2416_sysclass,
};
static void s3c2416_hard_reset(void)
{
__raw_writel(S3C2443_SWRST_RESET, S3C2443_SWRST);
}
int __init s3c2416_init(void)
{
printk("S3C2416: Initialising architecture\n");
开发者ID:iamnpc,项目名称:samsung-s3c6410-android.1.0,代码行数:30,代码来源:s3c2416.c
示例13: up
op_arm_model->stop();
up(&op_arm_sem);
return 0;
}
static int op_arm_resume(struct sys_device *dev)
{
down(&op_arm_sem);
if (op_arm_enabled && op_arm_model->start())
op_arm_enabled = 0;
up(&op_arm_sem);
return 0;
}
static struct sysdev_class oprofile_sysclass = {
set_kset_name("oprofile"),
.resume = op_arm_resume,
.suspend = op_arm_suspend,
};
static struct sys_device device_oprofile = {
.id = 0,
.cls = &oprofile_sysclass,
};
static int __init init_driverfs(void)
{
int ret;
if (!(ret = sysdev_class_register(&oprofile_sysclass)))
ret = sysdev_register(&device_oprofile);
开发者ID:1x23,项目名称:unifi-gpl,代码行数:31,代码来源:common.c
示例14: s3c2412_resume
return 0;
}
static int s3c2412_resume(struct sys_device *dev)
{
s3c_pm_do_restore(s3c2412_sleep, ARRAY_SIZE(s3c2412_sleep));
return 0;
}
#else
#define s3c2412_suspend NULL
#define s3c2412_resume NULL
#endif
struct sysdev_class s3c2412_sysclass = {
set_kset_name("s3c2412-core"),
.suspend = s3c2412_suspend,
.resume = s3c2412_resume
};
static struct sys_device s3c2412_sysdev = {
.cls = &s3c2412_sysclass,
};
static void s3c2412_idle(void)
{
s3c2412_gen_stbywfi(S3C2412_PWRCFG_STBYWFI_IDLE);
}
void __init s3c2412_map_io(struct map_desc *mach_desc, int size)
{
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:31,代码来源:s3c2412.c
示例15: set_kset_name
* called as close as possible to 500 ms before the new second starts.
*/
if (ntp_synced() &&
xtime.tv_sec > last_rtc_update + 660 &&
(xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 &&
(xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) {
if (rtc_set_time(xtime.tv_sec) == 0)
last_rtc_update = xtime.tv_sec;
else
/* do it again in 60s */
last_rtc_update = xtime.tv_sec - 600;
}
}
static struct sysdev_class timer_sysclass = {
set_kset_name("timer"),
};
static int __init timer_init_sysfs(void)
{
int ret = sysdev_class_register(&timer_sysclass);
if (ret != 0)
return ret;
sys_timer->dev.cls = &timer_sysclass;
return sysdev_register(&sys_timer->dev);
}
device_initcall(timer_init_sysfs);
void (*board_time_init)(void);
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:31,代码来源:time.c
示例16: set_kset_name
/*
* drivers/base/node.c - basic Node class support
*/
#include <linux/sysdev.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/node.h>
#include <linux/hugetlb.h>
#include <linux/cpumask.h>
#include <linux/topology.h>
#include <linux/nodemask.h>
static struct sysdev_class node_class = {
set_kset_name("node"),
};
static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
{
struct node *node_dev = to_node(dev);
cpumask_t mask = node_to_cpumask(node_dev->sysdev.id);
int len;
/* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
BUILD_BUG_ON(MAX_NUMNODES/4 > PAGE_SIZE/2);
len = cpumask_scnprintf(buf, PAGE_SIZE-1, mask);
len += sprintf(buf + len, "\n");
return len;
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:31,代码来源:node.c
示例17: irq_resume
{
return 0;
}
static int irq_resume(struct sys_device *dev)
{
/* disable all irq sources */
return 0;
}
#else
#define irq_suspend NULL
#define irq_resume NULL
#endif
static struct sysdev_class irq_class = {
set_kset_name("irq"),
.suspend = irq_suspend,
.resume = irq_resume,
};
static struct sys_device irq_device = {
.id = 0,
.cls = &irq_class,
};
static int __init irq_init_sysfs(void)
{
int ret = sysdev_class_register(&irq_class);
if (ret == 0)
ret = sysdev_register(&irq_device);
return ret;
开发者ID:iPodLinux,项目名称:linux-2.6.7-ipod,代码行数:31,代码来源:irq.c
示例18: acpi_shutdown
static int acpi_shutdown(struct sys_device *x)
{
switch (system_state) {
case SYSTEM_POWER_OFF:
/* Prepare to power off the system */
return acpi_sleep_prepare(ACPI_STATE_S5);
case SYSTEM_SUSPEND_DISK:
/* Prepare to suspend the system to disk */
return acpi_sleep_prepare(ACPI_STATE_S4);
default:
return 0;
}
}
static struct sysdev_class acpi_sysclass = {
set_kset_name("acpi"),
.shutdown = acpi_shutdown
};
static struct sys_device device_acpi = {
.id = 0,
.cls = &acpi_sysclass,
};
static int acpi_poweroff_init(void)
{
if (!acpi_disabled) {
u8 type_a, type_b;
acpi_status status;
status =
开发者ID:xf739645524,项目名称:kernel-rhel5,代码行数:31,代码来源:poweroff.c
示例19: lapic_nmi_suspend
static int lapic_nmi_suspend(struct sys_device *dev, u32 state)
{
nmi_pm_active = nmi_active;
disable_lapic_nmi_watchdog();
return 0;
}
static int lapic_nmi_resume(struct sys_device *dev)
{
if (nmi_pm_active > 0)
enable_lapic_nmi_watchdog();
return 0;
}
static struct sysdev_class nmi_sysclass = {
set_kset_name("lapic_nmi"),
.resume = lapic_nmi_resume,
.suspend = lapic_nmi_suspend,
};
static struct sys_device device_lapic_nmi = {
.id = 0,
.cls = &nmi_sysclass,
};
static int __init init_lapic_nmi_sysfs(void)
{
int error;
if (nmi_active == 0 || nmi_watchdog != NMI_LOCAL_APIC)
return 0;
开发者ID:prime5711,项目名称:blackbox,代码行数:31,代码来源:nmi.c
示例20: set_kset_name
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/sysdev.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/err.h>
#include <linux/string.h>
#include <asm/dma.h>
static struct sysdev_class dma_sysclass = {
set_kset_name("dma"),
};
EXPORT_SYMBOL(dma_sysclass);
static ssize_t dma_show_devices(struct sys_device *dev, char *buf)
{
ssize_t len = 0;
int i;
for (i = 0; i < MAX_DMA_CHANNELS; i++) {
struct dma_info *info = get_dma_info(i);
struct dma_channel *channel = &info->channels[i];
len += sprintf(buf + len, "%2d: %14s %s\n",
channel->chan, info->name,
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:31,代码来源:dma-sysfs.c
注:本文中的set_kset_name函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论