The lenear route is much easier to implement using a lm317, however (depending on the load) it will get very hot, much hotter that a proper PWM implementation.