ov5647 91 drivers/media/i2c/ov5647.c static inline struct ov5647 *to_state(struct v4l2_subdev *sd) ov5647 93 drivers/media/i2c/ov5647.c return container_of(sd, struct ov5647, sd); ov5647 350 drivers/media/i2c/ov5647.c struct ov5647 *ov5647 = to_state(sd); ov5647 353 drivers/media/i2c/ov5647.c mutex_lock(&ov5647->lock); ov5647 355 drivers/media/i2c/ov5647.c if (on && !ov5647->power_count) { ov5647 358 drivers/media/i2c/ov5647.c ret = clk_prepare_enable(ov5647->xclk); ov5647 367 drivers/media/i2c/ov5647.c clk_disable_unprepare(ov5647->xclk); ov5647 375 drivers/media/i2c/ov5647.c clk_disable_unprepare(ov5647->xclk); ov5647 380 drivers/media/i2c/ov5647.c } else if (!on && ov5647->power_count == 1) { ov5647 394 drivers/media/i2c/ov5647.c clk_disable_unprepare(ov5647->xclk); ov5647 398 drivers/media/i2c/ov5647.c ov5647->power_count += on ? 1 : -1; ov5647 399 drivers/media/i2c/ov5647.c WARN_ON(ov5647->power_count < 0); ov5647 402 drivers/media/i2c/ov5647.c mutex_unlock(&ov5647->lock); ov5647 553 drivers/media/i2c/ov5647.c struct ov5647 *sensor; ov5647 617 drivers/media/i2c/ov5647.c struct ov5647 *ov5647 = to_state(sd); ov5647 619 drivers/media/i2c/ov5647.c v4l2_async_unregister_subdev(&ov5647->sd); ov5647 620 drivers/media/i2c/ov5647.c media_entity_cleanup(&ov5647->sd.entity); ov5647 622 drivers/media/i2c/ov5647.c mutex_destroy(&ov5647->lock);