From 46867ff39cedda8c601dff6487350fbaf80efa60 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 28 Mar 2004 12:00:42 +0000 Subject: [PATCH] Backport a few fixes from 2.6: * remove two unused structure members * remove needless kind checks (only one kind) git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2397 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/pcf8591.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/kernel/chips/pcf8591.c b/kernel/chips/pcf8591.c index 8e63befa..dd8edb56 100644 --- a/kernel/chips/pcf8591.c +++ b/kernel/chips/pcf8591.c @@ -70,9 +70,7 @@ SENSORS_INSMOD_1(pcf8591); struct pcf8591_data { - struct semaphore lock; int sysctl_id; - enum chips type; struct semaphore update_lock; char valid; /* !=0 if following fields are valid */ @@ -206,16 +204,8 @@ int pcf8591_detect(struct i2c_adapter *adapter, int address, if (kind <= 0) kind = pcf8591; - if (kind == pcf8591) { - type_name = "pcf8591"; - client_name = "PCF8591 chip"; - } else { -#ifdef DEBUG - printk(KERN_ERR "pcf8591.o: Internal error: unknown kind (%d)?!?", - kind); -#endif - goto ERROR1; - } + type_name = "pcf8591"; + client_name = "PCF8591 chip"; /* Fill in the remaining client fields and put it into the global list */ strcpy(new_client->name, client_name); @@ -247,7 +237,6 @@ int pcf8591_detect(struct i2c_adapter *adapter, int address, ERROR4: i2c_detach_client(new_client); ERROR3: - ERROR1: kfree(new_client); ERROR0: return err;