Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751085AbWEZQ3b (ORCPT ); Fri, 26 May 2006 12:29:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751075AbWEZQ3b (ORCPT ); Fri, 26 May 2006 12:29:31 -0400 Received: from pne-smtpout4-sn2.hy.skanova.net ([81.228.8.154]:28324 "EHLO pne-smtpout4-sn2.hy.skanova.net") by vger.kernel.org with ESMTP id S1751065AbWEZQ3Z (ORCPT ); Fri, 26 May 2006 12:29:25 -0400 Message-Id: <20060526162910.769727000@gmail.com> References: <20060526161129.557416000@gmail.com> User-Agent: quilt/0.44-1 Date: Fri, 26 May 2006 19:11:42 +0300 From: Anssi Hannula To: Dmitry Torokhov Cc: linux-joystick@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org Subject: [patch 13/13] input: use -ENOSPC instead of -ENOMEM in iforce when device full Content-Disposition: inline; filename=ff-refactoring-iforce-enomem-to-enospc.diff Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2050 Lines: 58 Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have enough free memory for the new effect. All other drivers are already been using -ENOSPC, so this makes the behaviour coherent. Signed-off-by: Anssi Hannula --- drivers/input/joystick/iforce/iforce-ff.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: linux-2.6.17-rc4-git12/drivers/input/joystick/iforce/iforce-ff.c =================================================================== --- linux-2.6.17-rc4-git12.orig/drivers/input/joystick/iforce/iforce-ff.c 2006-05-26 16:55:12.000000000 +0300 +++ linux-2.6.17-rc4-git12/drivers/input/joystick/iforce/iforce-ff.c 2006-05-26 16:57:13.000000000 +0300 @@ -47,7 +47,7 @@ static int make_magnitude_modifier(struc iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -80,7 +80,7 @@ static int make_period_modifier(struct i iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -120,7 +120,7 @@ static int make_envelope_modifier(struct iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } @@ -157,7 +157,7 @@ static int make_condition_modifier(struc iforce->device_memory.start, iforce->device_memory.end, 2L, NULL, NULL)) { mutex_unlock(&iforce->mem_mutex); - return -ENOMEM; + return -ENOSPC; } mutex_unlock(&iforce->mem_mutex); } -- Anssi Hannula - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/