From 99d138d6f91eb2106f54755afbe447d91a484f2a Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Thu, 9 Aug 2012 12:24:38 +0900 Subject: [PATCH] [Title] modify source according to kernel coding style. [Type] [Module] emulator-kernel / codec [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- drivers/maru/maru_codec.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/maru/maru_codec.c b/drivers/maru/maru_codec.c index a3bb2bdfc625..35d04ebcdbb7 100644 --- a/drivers/maru/maru_codec.c +++ b/drivers/maru/maru_codec.c @@ -3,7 +3,7 @@ * * Copyright (c) 2011-2012 Samsung Electronics Co., Ltd. All rights reserved. * - * Contact: + * Contact: * Kitae KIM * SeokYeon Hwang * DongKyun Yun @@ -21,7 +21,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. * * Contributors: * - S-Core Co., Ltd @@ -32,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -39,10 +41,9 @@ #include #include #include +#include #include #include -#include -#include #define DRIVER_NAME "codec" #define CODEC_MAJOR 240 @@ -125,9 +126,8 @@ static ssize_t svcodec_read(struct file *file, char __user *buf, return 0; } -/* Another way to copy data between guest and host. */ /* Copy data between guest and host using mmap operation. */ -static ssize_t svcodec_write (struct file *file, const char __user *buf, +static ssize_t svcodec_write(struct file *file, const char __user *buf, size_t count, loff_t *fops) { struct codec_param paramInfo; @@ -250,11 +250,7 @@ static irqreturn_t svcodec_irq_handler (int irq, void *dev_id) } spin_lock_irqsave(&dev->lock, flags); - CODEC_LOG(KERN_DEBUG, "irq is for this module.\n"); - writel(0, dev->ioaddr + CODEC_QUERY_STATE); - - spin_lock_irqsave(&dev->lock, flags); dev->sleep_flag = 1; wake_up_interruptible(&dev->codec_wq); @@ -296,7 +292,7 @@ static int svcodec_open(struct inode *inode, struct file *file) return 0; } -static int svcodec_release (struct inode *inode, struct file *file) +static int svcodec_release(struct inode *inode, struct file *file) { int max_size = USABLE_MMAP_MAX_SIZE; uint8_t *useMmap; @@ -338,7 +334,7 @@ static int svcodec_release (struct inode *inode, struct file *file) } /* define file opertion for CODEC */ -struct file_operations svcodec_fops = { +const struct file_operations svcodec_fops = { .owner = THIS_MODULE, .read = svcodec_read, .write = svcodec_write, @@ -483,13 +479,13 @@ static struct pci_driver driver = { .remove = svcodec_remove, }; -static int __init svcodec_init (void) +static int __init svcodec_init(void) { CODEC_LOG(KERN_INFO, "device is initialized.\n"); return pci_register_driver(&driver); } -static void __exit svcodec_exit (void) +static void __exit svcodec_exit(void) { pci_unregister_driver(&driver); } -- 2.34.1