From patchwork Fri Feb 18 01:15:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Walls X-Patchwork-Id: 572741 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1I1FnoW022887 for ; Fri, 18 Feb 2011 01:15:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758169Ab1BRBPs (ORCPT ); Thu, 17 Feb 2011 20:15:48 -0500 Received: from proofpoint-cluster.metrocast.net ([65.175.128.136]:18455 "EHLO proofpoint-cluster.metrocast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754759Ab1BRBPr (ORCPT ); Thu, 17 Feb 2011 20:15:47 -0500 Received: from [192.168.1.2] (d-216-36-28-191.cpe.metrocast.net [216.36.28.191]) (authenticated bits=0) by pear.metrocast.net (8.13.8/8.13.8) with ESMTP id p1I1FjlS025507 for ; Fri, 18 Feb 2011 01:15:46 GMT Subject: [PATCH 05/13] lirc_zilog: Use kernel standard methods for marking device non-seekable From: Andy Walls To: linux-media@vger.kernel.org In-Reply-To: <1297991502.9399.16.camel@localhost> References: <1297991502.9399.16.camel@localhost> Date: Thu, 17 Feb 2011 20:15:58 -0500 Message-ID: <1297991758.9399.21.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-02-18_01:2011-02-17, 2011-02-18, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-1012030000 definitions=main-1102170207 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 18 Feb 2011 01:15:50 +0000 (UTC) diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c index c857b99..720ef67 100644 --- a/drivers/staging/lirc/lirc_zilog.c +++ b/drivers/staging/lirc/lirc_zilog.c @@ -712,12 +712,6 @@ static int tx_init(struct IR_tx *tx) return 0; } -/* do nothing stub to make LIRC happy */ -static loff_t lseek(struct file *filep, loff_t offset, int orig) -{ - return -ESPIPE; -} - /* copied from lirc_dev */ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos) { @@ -1099,6 +1093,7 @@ static int open(struct inode *node, struct file *filep) /* stash our IR struct */ filep->private_data = ir; + nonseekable_open(node, filep); return 0; } @@ -1150,7 +1145,7 @@ static struct i2c_driver driver = { static const struct file_operations lirc_fops = { .owner = THIS_MODULE, - .llseek = lseek, + .llseek = no_llseek, .read = read, .write = write, .poll = poll,