cregit-Linux how code gets into the kernel

Release 4.11 arch/avr32/boards/merisc/merisc_sysfs.c

/*
 * Merisc sysfs exports
 *
 * Copyright (C) 2008 Martinsson Elektronik AB
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/device.h>
#include <linux/timer.h>
#include <linux/err.h>
#include <linux/ctype.h>
#include "merisc.h"


static ssize_t merisc_model_show(struct class *class, char *buf) { ssize_t ret = 0; sprintf(buf, "%s\n", merisc_model()); ret = strlen(buf) + 1; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Larsson42100.00%1100.00%
Total42100.00%1100.00%


static ssize_t merisc_revision_show(struct class *class, char *buf) { ssize_t ret = 0; sprintf(buf, "%s\n", merisc_revision()); ret = strlen(buf) + 1; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Larsson42100.00%1100.00%
Total42100.00%1100.00%

static struct class_attribute merisc_class_attrs[] = { __ATTR(model, S_IRUGO, merisc_model_show, NULL), __ATTR(revision, S_IRUGO, merisc_revision_show, NULL), __ATTR_NULL, }; struct class merisc_class = { .name = "merisc", .owner = THIS_MODULE, .class_attrs = merisc_class_attrs, };
static int __init merisc_sysfs_init(void) { int status; status = class_register(&merisc_class); if (status < 0) return status; return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Jonas Larsson32100.00%1100.00%
Total32100.00%1100.00%

postcore_initcall(merisc_sysfs_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Jonas Larsson205100.00%1100.00%
Total205100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.