tbsdtv / linux_media

TBS linux open source drivers
https://github.com/tbsdtv/linux_media/wiki
Other
174 stars 80 forks source link

error: too many arguments to function 'usb_maxpacket' #305

Closed iotic-labs-markwharton closed 1 year ago

iotic-labs-markwharton commented 1 year ago

I get this compiler error on 5.19.0-32-generic #33~22.04.1-Ubuntu

make[2]: Entering directory '/usr/src/linux-headers-5.19.0-32-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
  You are using:           gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

...

/home/mark/3rd/tbs/media_build/v4l/tm6000-dvb.c:123:16: error: too many arguments to function 'usb_maxpacket'
  123 |         size = usb_maxpacket(dev->udev, pipe, usb_pipeout(pipe));
      |                ^~~~~~~~~~~~~
In file included from /home/mark/3rd/tbs/media_build/v4l/tm6000-dvb.c:10:
./include/linux/usb.h:1974:19: note: declared here
 1974 | static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
      |                   ^~~~~~~~~~~~~
kafisc1 commented 1 year ago

I'm getting the same error. But I don't have a solution yet.

iotic-labs-markwharton commented 1 year ago

looks like the definition changed in linux/usb.h. (I know that's not a solution)

foyb commented 1 year ago

Hi,

according to https://github.com/torvalds/linux/commit/0f08c2e7458e25c967d844170f8ad1aac3b57a02 the third parameter for usb_maxpacket is redundant and therefore has been removed.

iotic-labs-markwharton commented 1 year ago

i would have a go at a fix myself, but I'm not confident. maybe later this week

iotic-labs-markwharton commented 1 year ago

i have a working fix on a branch. need to find out how to push it

iotic-labs-markwharton commented 1 year ago

Ok worked that out, now I don't have permissions. I give up.

 git push -u origin issue-305
Username for 'https://github.com': iotic-labs-markwharton
Password for 'https://iotic-labs-markwharton@github.com':
remote: Permission to tbsdtv/linux_media.git denied to iotic-labs-markwharton.
fatal: unable to access 'https://github.com/tbsdtv/linux_media.git/': The requested URL returned error: 403
crazycat69 commented 1 year ago

Updated, now compatible with 4.14-6.2

iotic-labs-markwharton commented 1 year ago

thanks @crazycat69 !