Show
Ignore:
Timestamp:
08/24/03 17:16:23 (10 years ago)
Author:
mds
Message:

Fix SMP compilation.

Re: Intel 82801DA ICH4

  • To: "Alexander Pohl" <alexander.pohl@xxxxxxxxxxxx>
  • Subject: Re: Intel 82801DA ICH4
  • From: Jean Delvare <khali@xxxxxxxxxxxx>
  • Date: Tue, 22 Jul 2003 23:42:06 +0200
  • Cc: sensors@xxxxxxxxxxxxxxxxxxxx
  • In-reply-to: <32787.62.246.185.231.1058905435.squirrel@…>
  • References: <32803.62.246.166.13.1058892758.squirrel@…><20030722191127.7b077828.khali@…><32787.62.246.185.231.1058905435.squirrel@…>
  • Reply-to: sensors@xxxxxxxxxxxxxxxxxxxx

I have some trouble compiling the module p4b_smbus.o and adding
support for the i2c-bus. Adding support for pci-hotplug to my kernel
was successful.
(reference to ticket # 1345)

Here the compiler output:

cc -DSMP -DMODVERSIONS -include
/lib/modules/2.4.20-hotplug/build/include/linux/modversions.h
-DKERNEL-DMODULE -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer-fno-strict-aliasing
-I/lib/modules/2.4.20-hotplug/build/include -c -o p4b_smbus.o
p4b_smbus.c p4b_smbus.c: In function `cleanup_module':
p4b_smbus.c:263: incompatible type for argument 1 of `write_lock'
p4b_smbus.c:268: invalid type argument of `->'
make: *** [p4b_smbus.o] Error 1

Strange. I can compile it. I suspect the code isn't SMP-compliant. Try
forcing SMP=0 in Makefile.p4b, just to make sure this is the cause of
the failure. Once confirmed, Mark D. Studebaker will take a look at it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/hotplug/p4b_smbus.c

    r1821 r1975  
    261261void cleanup_module(void) 
    262262{ 
    263         write_lock_irqsave(i801smbus_lock, i801smbus_lock_flags); 
     263        write_lock_irqsave(&i801smbus_lock, i801smbus_lock_flags); 
    264264        if (i801smbus_inserted) { 
    265265                pci_remove_device(i801smbus); 
    266266                i801smbus_inserted = FALSE; 
    267267        } 
    268         write_unlock_irqrestore(i801smbus_lock, i801smbus_lock_flags); 
     268        write_unlock_irqrestore(&i801smbus_lock, i801smbus_lock_flags); 
    269269 
    270270        if (NULL != i801smbus)