Changed path to existing GPIO class on new kernel
Changed path to existing GPIO class on new kernel

On the new kernel, the path '/sys/devices/soc' does not exist, so wrong path to GPIO was used on Raspberry Pi 2. By checking if the actual folder exists, this problem is solved.
VipSaran/pi-gpio,rakeshpai/pi-gpio