Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: ccs-pll: Make variables const where appropriate

Many functions operate on data structures that are read only, both in
the implementation and by design. Mark them as const to increase
readability and avoid future mistakes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Laurent Pinchart and committed by
Hans Verkuil
f90133bd c0c1a6bf

+8 -8
+8 -8
drivers/media/i2c/ccs-pll.c
··· 75 75 76 76 #define PLL_FL(f) CCS_PLL_FLAG_##f 77 77 78 - static void print_pll(struct device *dev, struct ccs_pll *pll) 78 + static void print_pll(struct device *dev, const struct ccs_pll *pll) 79 79 { 80 80 const struct { 81 - struct ccs_pll_branch_fr *fr; 82 - struct ccs_pll_branch_bk *bk; 81 + const struct ccs_pll_branch_fr *fr; 82 + const struct ccs_pll_branch_bk *bk; 83 83 unsigned int which; 84 84 } branches[] = { 85 85 { &pll->vt_fr, &pll->vt_bk, PLL_VT }, ··· 150 150 151 151 static int check_fr_bounds(struct device *dev, 152 152 const struct ccs_pll_limits *lim, 153 - struct ccs_pll *pll, unsigned int which) 153 + const struct ccs_pll *pll, unsigned int which) 154 154 { 155 155 const struct ccs_pll_branch_limits_fr *lim_fr; 156 - struct ccs_pll_branch_fr *pll_fr; 156 + const struct ccs_pll_branch_fr *pll_fr; 157 157 const char *s = pll_string(which); 158 158 int rval; 159 159 ··· 190 190 191 191 static int check_bk_bounds(struct device *dev, 192 192 const struct ccs_pll_limits *lim, 193 - struct ccs_pll *pll, unsigned int which) 193 + const struct ccs_pll *pll, unsigned int which) 194 194 { 195 195 const struct ccs_pll_branch_limits_bk *lim_bk; 196 - struct ccs_pll_branch_bk *pll_bk; 196 + const struct ccs_pll_branch_bk *pll_bk; 197 197 const char *s = pll_string(which); 198 198 int rval; 199 199 ··· 230 230 return rval; 231 231 } 232 232 233 - static int check_ext_bounds(struct device *dev, struct ccs_pll *pll) 233 + static int check_ext_bounds(struct device *dev, const struct ccs_pll *pll) 234 234 { 235 235 if (!(pll->flags & CCS_PLL_FLAG_FIFO_DERATING) && 236 236 pll->pixel_rate_pixel_array > pll->pixel_rate_csi) {