Upgraded my Tumbleweed to kernel 4.10.x and Nvidia 340 driver won't build. Until Nvidia fix it, here are steps to patch the 340.102 driver to make it works.
Download the 340.102 driver from Nvidia:
Unpack the driver:
Apply patch for kernel 4.9.x:
Apply patch for kernel 4.10.x:
Proceed to install. Note that the unified memory module can't be built with this patch, so we are disabling it:
sudo ./nvidia-installer --no-unified-memory