CAL. PEN. CODE § 654 : California Code - Section 654

(a) An act or omission that is punishable in different ways by different provisions of law shall be punished under the provision that provides for the longest potential term of imprisonment, but in no case shall the act or omission be punished under more than one provision. An acquittal or conviction and sentence under any one bars a prosecution for the same act or omission under any other.

(b) Notwithstanding subdivision (a), a defendant sentenced pursuant to subdivision (a) shall not be granted probation if any of the provisions that would otherwise apply to the defendant prohibits the granting of probation. 654.1. It shall be unlawful for any person, acting individually or as an officer or employee of a corporation, or as a member of a copartnership or as a commission agent or employee of another person, firm or corporation, to sell or offer for sale or, to negotiate, provide or arrange for, or to advertise or hold himself out as one who sells or offers for sale or negotiates, provides or arranges for transportation of a person or persons on an individual fare basis over the public highways of the State of California unless such transportation is to be furnished or provided solely by, and such sale is authorized by, a carrier having a valid and existing certificate of convenience and necessity, or other valid and existing permit from the Public Utilities Commission of the State of California, or from the Interstate Commerce Commission of the United States, authorizing the holder of such certificate or permit to provide such transportation. 654.2. The provisions of Section 654.1 of the Penal Code shall not apply to the selling, furnishing, or providing of transportation of any person or persons in any of the following circumstances:

(a) When no compensation is paid or to be paid, either directly or indirectly, for the transportation.

(b) For the furnishing or providing of transportation to or from work of employees engaged in farmwork on any farm of the State of California.

(c) For the furnishing or providing of transportation to and from work of employees of any nonprofit cooperative association, organized pursuant to any law of the State of California.

(d) For the transportation of persons wholly or substantially within the limits of a single municipality or of contiguous municipalities.

(e) For transportation of persons over a route wholly or partly within a national park or state park where the transportation is sold in conjunction with, or as part of, a rail trip or trip over a regularly operated motorbus transportation system or line.

(f) For the transportation of persons between home and work locations or of persons having a common work-related trip purpose in a vehicle having a seating capacity of 15 passengers or less, including the driver, which is used for the purpose of ridesharing, as defined in Section 522 of the Vehicle Code, when the ridesharing is incidental to another purpose of the driver. This exemption does not apply if the primary purpose for the transportation of those persons is to make a profit. "Profit," as used in this subdivision, does not include the recovery of the actual costs incurred in owning and operating a vanpool vehicle, as defined in Section 668 of the Vehicle Code.