1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Cobalt buttons platform device.
5 * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org>
8 #include <linux/platform_device.h>
9 #include <linux/errno.h>
10 #include <linux/init.h>
12 static struct resource cobalt_buttons_resource __initdata = {
15 .flags = IORESOURCE_MEM,
18 static __init int cobalt_add_buttons(void)
20 struct platform_device *pd;
23 pd = platform_device_alloc("Cobalt buttons", -1);
27 error = platform_device_add_resources(pd, &cobalt_buttons_resource, 1);
31 error = platform_device_add(pd);
38 platform_device_put(pd);
41 device_initcall(cobalt_add_buttons);