
182 Cal.App.4th 1348 (2010)
THE PEOPLE, Plaintiff and Respondent,
v.
THOMAS THEODORE BROOKS, Defendant and Appellant.
No. B216238.
Court of Appeals of California, Second District, Division Six.
March 16, 2010.
As modified April 7, 2010.
*1349 John Derrick, under appointment by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Pamela C. Hamanaka, Assistant Attorney General, Lawrence M. Daniels and Michael R. Johnsen, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
GILBERT, P. J.
Thomas Theodore Brooks has a physician's recommendation for medical marijuana use. (Health & Saf. Code, § 11362.5, subd. (d).)[1] Nevertheless, we conclude circumstances here permit the trial court to impose a probation condition barring Brooks's use of medical marijuana. We affirm.


*1350 FACTS
In December 2006, Brooks was arrested for possession of marijuana and methamphetamine. In February 2007, he pled guilty to one count of possession of methamphetamine. Brooks waived Proposition 36 probation (Pen. Code, § 1210.1, subd. (b)(4)), and the trial court placed him on formal probation for three years. Among the terms and conditions of probation was that Brooks not be in possession of illegal drugs unless on recommendation of a physician pursuant to Proposition 215, the Compassionate Use Act of 1996 (CUA), section 11362.5 et seq.
In January 2009, the police stopped Brooks for a traffic violation and found approximately two pounds of marijuana in his car. The quantity and packaging led them to arrest Brooks for possession of marijuana for sale.
Instead of bringing a separate charge, the prosecution moved to revoke Brooks's probation. A contested probation violation hearing was held in February 2009. Brooks testified that the marijuana was for his personal use, he cooked it into a variety of foods, and that at the time of his arrest he showed the police a marijuana recommendation from a physician.
Dr. David Bearman testified he gave Brooks a marijuana recommendation in January 2007. Bearman said that two pounds was a reasonable amount for personal use, particularly for someone who ingested it by means other than smoking. Bearman had given Brooks the recommendation for asthma, irritable bowel syndrome and shoulder pain.
The court found Brooks possessed marijuana for sale, not personal use. It found him in violation of probation. It reinstated probation but modified the terms to prohibit Brooks from any use or possession of controlled substances.

DISCUSSION

I
Brooks contends that as a matter of law the court cannot impose a probation condition barring the use of doctor-recommended medical marijuana.
In 1996, the electorate passed Proposition 215, the CUA, later codified as section 11362.5. Subdivision (d) of section 11362.5 provides: "Section 11357, relating to the possession of marijuana, and Section 11358, relating to the cultivation of marijuana, shall not apply to a patient, or to a patient's primary *1351 caregiver, who possesses or cultivates marijuana for the personal medical purposes of the patient upon the written or oral recommendation or approval of a physician."
In People v. Bianco (2001) 93 Cal.App.4th 748 [13 Cal.Rptr.2d 392], the appellate court held that section 11362.5 is not a defense to a violation of probation that directs the defendant to "obey all laws." (93 Cal.App.4th at pp. 751-752.) It reasoned that marijuana use, even with a doctor's recommendation, is a violation of federal law. (Id. at p. 753.) The court further reasoned that, federal law aside, a probation condition can prohibit otherwise lawful conduct that is reasonably related to the defendant's criminal offense. (Id. at pp. 753-754.)
In People v. Mower (2002) 28 Cal.4th 457 [122 Cal.Rptr.2d 326, 49 P.3d 1067], our Supreme Court held the trial court erred in instructing that the defendant had the burden of proving his medical marijuana defense by a preponderance of the evidence. Instead, the defendant only had to raise a reasonable doubt. In so holding, the court said: "As a result of the enactment of section 11362.5[,] [subdivision] (d), the possession and cultivation of marijuana is no more criminalso long as its conditions are satisfiedthan the possession and acquisition of any prescription drug with a physician's prescription." (Id. at p. 482.)
In People v. Tilehkooh (2003) 113 Cal.App.4th 1433, 1445-1447 [7 Cal.Rptr.3d 226], the court revisited its opinion in Bianco. Relying on Bianco, the prosecution argued the defendant's possession of medical marijuana under the CUA violated the probation condition "obey all laws." The court, prompted by Mower, decided that Bianco was wrong in stating that possession of marijuana under the CUA violated the defendant's probation because it violated federal law.
(1) Neither Mower nor Tilehkooh helps Brooks. The cases simply conclude that the use of marijuana under the CUA is lawful in California and that such use does not violate the probation condition "obey all laws." (People v. Tilehkooh, supra, 113 Cal.App.4th at p. 1445.) Neither case holds that the trial court cannot ever impose a probation condition barring the use of medical marijuana. At best, Brooks quotes Tilehkooh, supra, 113 Cal.App.4th at page 1444, which states: "A rehabilitative purpose is not served when the probation condition proscribes the lawful use of marijuana for medical purposes pursuant to section 11362.5 any more than it is served by the lawful use of a prescription drug." Tilehkooh, however, does not sanction a section 11362.5 defense where there is a claim that the defendant "diverted marijuana for nonmedical purposes. [Citation.]" (Tilehkooh, supra, at p. 1437.) There may well be circumstances under which a trial court may properly ban even a prescription drug as a condition of probation.
*1352 Recently, in People v. Moret (2009) 180 Cal.App.4th 839 [104 Cal.Rptr.3d 1], the appellate court affirmed an order granting probation on condition that the defendant abstain from using medical marijuana notwithstanding a physician's recommendation. The lead opinion discusses section 11362.795. (Moret, at pp. 853-855 (lead opn. of Haerle, J.).) That section provides in part: "(a)(1) Any criminal defendant who is eligible to use marijuana pursuant to Section 11362.5 may request that the court confirm that he or she is allowed to use medical marijuana while he or she is on probation or released on bail. [¶] (2) The court's decision and the reasons for the decision shall be stated on the record and an entry stating those reasons shall be made in the minutes of the court." There would be no reason for the Legislature to speak of the court's "decision" or to require the court to state reasons for its decision on the record if the court had no discretion to prohibit the use of medical marijuana.[2]
It is true that section 11362.795 is not part of the CUA. Instead, it is part of the medical marijuana program (MMP) enacted by the Legislature (§ 11362.7 et seq.). After Moret, our Supreme Court decided People v. Kelly (2010) 47 Cal.4th 1008 [103 Cal.Rptr.3d 733, 222 P.3d 186]. It held that section 11362.77 impermissibly amends the CUA to the extent that it burdens a defense under the CUA to a charge of possessing or cultivating marijuana. (Kelly, supra, at p. 1012.) Section 11362.77 sets specific quantity limitations for possession or cultivation of medical marijuana, whereas the CUA contains no such specific limitations. There is nothing in Kelly, however that would invalidate the probation provisions of section 11362.795, subdivision (a).
(2) In any event, section 11362.795 aside, it is well settled that the trial court has the discretion to impose probation conditions that prohibit even legal activity. (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal.Rptr. 905, 541 P.2d 545].) Brooks presents no compelling reason for making an exception for medical marijuana. The matter is best left to the sound discretion of the trial court.

II
Brooks contends there is no nexus between his criminal act and the use of medical marijuana under the CUA.
(3) A probation condition forbidding conduct that is not criminal is valid if the conduct is reasonably related to the crime of which the defendant was convicted or to future criminality. (People v. Lent, supra, 15 Cal.3d at p. 486.)
*1353 Brooks argues there is no nexus between possessing legal medical marijuana and his crime because he obtained the marijuana he possessed for sale illegally. The argument misses the point. Brooks tried to hide his illegal conduct behind the CUA. Thus there is a direct relationship between the crime of which he was convicted and lawful possession under the CUA. Moreover, the probation condition relates to future criminality. The condition removes any temptation to try to hide criminal possession of marijuana behind the CUA again.

III
Brooks contends depriving him of the use of marijuana recommended by a doctor constitutes cruel and unusual punishment in violation of the Eighth Amendment to the United States Constitution.
Brooks relies on Estelle v. Gamble (1976) 429 U.S. 97, 107 [50 L.Ed.2d 251, 97 S.Ct. 285]. There the court held that "deliberate indifference" by prison authorities to an inmate's medical needs could raise a constitutional claim. (Id. at p. 105.) Even assuming Estelle applies to a probation condition imposed by a court on someone who is not confined in a prison, Brooks is not helped. The court did not exhibit a deliberate indifference to Brooks's medical needs. There was no evidence medical marijuana was the only treatment or even the most effective treatment for his medical condition. Moreover, there is ample evidence from Brooks's criminal history that he suffers from addiction to intoxicating substances. Keeping him from such a substance does not constitute deliberate indifference to his medical needs.
The judgment is affirmed.
Yegan, J., and Coffee, J., concurred.
NOTES
[1]  All statutory references are to the Health and Safety Code unless stated otherwise.
[2]  The concurring opinion stated that the discussion of section 11362.795 was not appropriate because, among other things, the effect of the statute was not briefed. (People v. Moret, supra, 180 Cal.App.4th at p. 857 (conc. opn. of Richman, J.).)
