Restart camera service I have a smartphone which the camera doesn't work very well with CyanogenMod. 

Sometimes (and very often), after taking some picture the camera stops working until I restart the phone. 

When I try to open it, it just says "Cannot connect to camera". 

I'd like to know if there are some way to "restart" the camera service, or something like that, because it's very annoying to be obligated to restart the phone everytime it stops working.

If that's somehow useful, I have a modified version of CyanogenMod 7 installed.
If the problem is in the kernel driver, as t0mm13b suggests, then only resetting the kernel driver will help. There might be a hacky way to achieve this with rmmod from the command line, if the device is rooted and that driver was built as a module in that ROM. I wouldn't recommend it. Restarting the phone is probably the only way to reset the driver.