2 * drivers/misc/android_usb.c
4 * Copyright (C) 2011 for Samsung Electronics
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /*-------------------------------------------------------------------------*/
24 #include <linux/platform_device.h>
26 extern int dyn_multi_node_create(struct device *dev);
27 extern int dyn_multi_node_delete(struct device *dev);
29 static const char driver_name[] = "android_usb";
31 static int android_usb_probe(struct platform_device *pdev)
35 ret = dyn_multi_node_create(&pdev->dev);
37 printk(KERN_INFO "Fail to create %s node", driver_name);
42 static int android_usb_remove(struct platform_device *pdev)
46 ret = dyn_multi_node_delete(&pdev->dev);
48 printk(KERN_INFO "Fail to remove %s node", driver_name);
54 static struct platform_driver android_usb_driver = {
55 .probe = android_usb_probe,
56 .remove = android_usb_remove,
63 static int __init android_usb_init(void)
67 ret = platform_driver_register(&android_usb_driver);
69 printk(KERN_INFO "Fail to register %s driver", driver_name);
74 static void __exit android_usb_exit(void)
76 platform_driver_unregister(&android_usb_driver);
77 printk(KERN_INFO "Unloaded %s driver\n", driver_name);
80 module_init(android_usb_init);
81 module_exit(android_usb_exit);
83 MODULE_DESCRIPTION(DRIVER_DESC);
84 MODULE_AUTHOR("Samsung");
85 MODULE_LICENSE("GPL");