aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/mediatek/c2k_ccci/core.c
blob: 88f8d04b57f0e4f1d5076b18d1aba9c24d5dade7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * core.c
 *
 * VIA CBP driver for Linux
 *
 * Copyright (C) 2011 VIA TELECOM Corporation, Inc.
 * Author: VIA TELECOM Corporation, Inc.
 *
 * This package 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.
 *
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/platform_device.h>

static struct kobject *c2k_kobj;

struct kobject *c2k_kobject_add(const char *name)
{
    struct kobject *kobj = NULL;
    if(c2k_kobj){
        kobj = kobject_create_and_add(name, c2k_kobj);
    }
    
    return kobj;
}

static int __init c2k_core_init(void)
{
    int ret = 0;
    c2k_kobj = kobject_create_and_add("c2k", NULL);
    if (!c2k_kobj){
        ret = -ENOMEM;
        goto err_create_kobj;
    }
err_create_kobj:
    return ret;
}

arch_initcall(c2k_core_init);