asymingt / rts5139

Fix for RTS5129 USB MMC card reader on Linux 3.16+ kernels
62 stars 18 forks source link

Not able to Make on Ubuntu 18.04 #19

Open maksokami opened 4 years ago

maksokami commented 4 years ago

build-essential is installed. Not sure what I'm missing.

$ uname -a
Linux Insp15 4.15.0-111-generic #112-Ubuntu SMP Thu Jul 9 20:32:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ make
make -C /lib/modules/4.15.0-111-generic/build/ SUBDIRS=/tmp/rts5139 modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-111-generic'
  CC [M]  /tmp/rts5139/rts51x.o
/tmp/rts5139/rts51x.c: In function ‘usb_autopm_enable’:
/tmp/rts5139/rts51x.c:103:19: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_set(&intf->pm_usage_cnt, 1);
                   ^~
/tmp/rts5139/rts51x.c: In function ‘usb_autopm_disable’:
/tmp/rts5139/rts51x.c:113:19: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_set(&intf->pm_usage_cnt, 0);
                   ^~
In file included from /tmp/rts5139/rts51x.c:47:0:
/tmp/rts5139/rts51x.c: In function ‘rts51x_resume’:
/tmp/rts5139/rts51x.h:176:39: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_read(&((chip)->usb->pusb_intf->pm_usage_cnt))
                                       ^
/tmp/rts5139/rts51x.c:175:9: note: in expansion of macro ‘GET_PM_USAGE_CNT’
     if (GET_PM_USAGE_CNT(chip) <= 0) {
         ^~~~~~~~~~~~~~~~
/tmp/rts5139/rts51x.h:178:38: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_set(&((chip)->usb->pusb_intf->pm_usage_cnt), (cnt))
                                      ^
/tmp/rts5139/rts51x.c:178:6: note: in expansion of macro ‘SET_PM_USAGE_CNT’
      SET_PM_USAGE_CNT(chip, 1);
      ^~~~~~~~~~~~~~~~
/tmp/rts5139/rts51x.c: In function ‘rts51x_reset_resume’:
/tmp/rts5139/rts51x.h:178:38: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_set(&((chip)->usb->pusb_intf->pm_usage_cnt), (cnt))
                                      ^
/tmp/rts5139/rts51x.c:209:4: note: in expansion of macro ‘SET_PM_USAGE_CNT’
    SET_PM_USAGE_CNT(chip, 1);
    ^~~~~~~~~~~~~~~~
/tmp/rts5139/rts51x.c: In function ‘rts51x_probe’:
/tmp/rts5139/rts51x.h:178:38: error: ‘struct usb_interface’ has no member named ‘pm_usage_cnt’
   atomic_set(&((chip)->usb->pusb_intf->pm_usage_cnt), (cnt))
                                      ^
/tmp/rts5139/rts51x.c:833:4: note: in expansion of macro ‘SET_PM_USAGE_CNT’
    SET_PM_USAGE_CNT(chip, 1);
    ^~~~~~~~~~~~~~~~
scripts/Makefile.build:330: recipe for target '/tmp/rts5139/rts51x.o' failed
make[2]: *** [/tmp/rts5139/rts51x.o] Error 1
Makefile:1582: recipe for target '_module_/tmp/rts5139' failed
make[1]: *** [_module_/tmp/rts5139] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-111-generic'
Makefile:46: recipe for target 'all' failed
make: *** [all] Error 2
Kyu commented 3 years ago

Did you install headers? I was getting a similar error,

make[1]: *** /lib/modules/5.0.0-36-lowlatency/build/: No such file or directory.  Stop.
Makefile:46: recipe for target 'all' failed
make: *** [all] Error 2

But I followed This Guide and all was good