From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451Ab0DEJjd (ORCPT ); Mon, 5 Apr 2010 05:39:33 -0400 Received: from mail-fx0-f227.google.com ([209.85.220.227]:55019 "EHLO mail-fx0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141Ab0DEJj0 (ORCPT ); Mon, 5 Apr 2010 05:39:26 -0400 MIME-Version: 1.0 X-Originating-IP: [212.159.75.221] Date: Mon, 5 Apr 2010 10:39:25 +0100 Message-ID: Subject: Bad watchdog ioctl definitions From: James Hogan To: Wim Van Sebroeck , H Hartley Sweeten , Andrew Morton , Thierry Reding , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I've noticed that some of the ioctl definitions in include/linux/watchdog.h are incorrect, for example: #define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int) This is a write ioctl so should be _IOW #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) I think this should just be _IO since the argument is ignored anyway >>From a quick grep, mpcore_wdt appears to be the only watchdog driver in drivers/watchdog that uses _IOC_DIR on the ioctl number, which breaks the SETOPTIONS ioctl on this driver. Is it usually even possible to change ioctl numbers for compatibility? What's the usual process? Cheers -- James Hogan