当前位置: 首页>>代码示例>>C++>>正文


C++ set_kset_name函数代码示例

本文整理汇总了C++中set_kset_name函数的典型用法代码示例。如果您正苦于以下问题:C++ set_kset_name函数的具体用法?C++ set_kset_name怎么用?C++ set_kset_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了set_kset_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的set_kset_name函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。